Nothing less than 6 feet. Anything less and I have to start unplugging it just to take the side panel off due to how it is positioned and how I route my cables.
Pretty much this.
I have a large desk with the keyboard in the middle, at the front, and the computer sits on the floor off to the side, toward the back.
Since I use ancient IBM iron with a Soarer's/Teensy, that run can be broken in half with one piece going from the Teensy to the USB port, and with the Teensy sitting on the desk the keyboard cable itself can be short.
That said, whenever I build a Soarer's/Teensy I use pull-up resistors as a matter of course, and 10 foot USB cable "just in case"