View Single Post
Old Jul 18th, 2006, 11:10 PM   #7
lectricpharaoh
SEXY SHOELESS GOD OF WAR!
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,197
Rep Power: 5 lectricpharaoh will become famous soon enough
Another option, and the better one for a non-trivial program, would be to use sensible defaults (such as the arrow keys), but allow the user to configure the keys. You would start the configuration process, and it would query the user for which physical key to use for each logical input, like "Please press the key to use for UP", or whatever. If you have a large number of logical inputs, you might want to allow the user to click on one from a menu, and then it would prompt them, but for a small number (say, half dozen or so), it's not too onerous to iterate through them all each time the user wants to configure the keys.

For bonus points, you could use other physical inputs to generate the same logical input to your program. For example, you could have arrow buttons as part of your GUI, and the user could either click them or use the assigned arrow keys on the keyboard to control movement. It's only really sensible to restrict the user to a single input method if only one makes sense, or if you're on a resource-constrained system, but in most cases, flexibility is good.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote