views:

51

answers:

1

I have a simple GUI that I am developing for an embedded system. The menus can be navigated with the up/down keys and an item can be activated by pressing a confirm key. Presently there are no double presses or long presses planned, but they might be implemented in future releases. Right now the keys are processed on key release. I like this configuration, but could there be a reason why I would want to process a key on button press instead? Any reason why someone has a preference over key press or key release?

+1  A: 

I'd go for key press, because it's the result of the user's desire to make something happen, and it's happening now.

Some users may move more slowly than others, so to only act on release of the key means delaying the user's intention, which goes against the UI principle of giving instant feedback for user actions.

What's your reason for preferring key release?

Incidentally, if these are actual physical switches, don't forget to do some debouncing in software. Jack Ganssle's Guide to Debouncing goes into a lot of detail on how to do this.

Steve Melnikoff