I'm trying to develop a screen locker for the Prizm (this time, I'll finish this project, I promise!). I have a few problems regarding the keyboard input.
The first is well known: the keyboard is too sensitive and key debouncing is needed. My difficulty is: I searched the forum and I could not find a definitive answer to key debouncing with non-blocking input (i.e. using GetKeyWait_OS). Can someone do the favor of explaining in a simple way, and preferably with code examples, how to do key debouncing?
The other question is related to the values GetKeyWait_OS returns.
I'm using the following to detect a pressed key on the keyboard:
Code:
If a key is pressed the function will return something other than zero, and kcol will contain the "column" of the key, and krow the "row". The 1 before &key is to block the Menu key from actually showing the menu (so the calculator is "locked").
What is the value of kcol and krow for the various keys of the keyboard? I know kcol 4 and krow 9 are the "coordinates" for the Menu key. But the "columns" and "rows" system doesn't look like it follows the order of the keys in the keyboard, or else I'm very dumb and not seeing it.
Anticipated regards
The first is well known: the keyboard is too sensitive and key debouncing is needed. My difficulty is: I searched the forum and I could not find a definitive answer to key debouncing with non-blocking input (i.e. using GetKeyWait_OS). Can someone do the favor of explaining in a simple way, and preferably with code examples, how to do key debouncing?
The other question is related to the values GetKeyWait_OS returns.
I'm using the following to detect a pressed key on the keyboard:
Code:
GetKeyWait_OS(&kcol,&krow,KEYWAIT_HALTOFF_TIMEROFF,0,1,&key)
If a key is pressed the function will return something other than zero, and kcol will contain the "column" of the key, and krow the "row". The 1 before &key is to block the Menu key from actually showing the menu (so the calculator is "locked").
What is the value of kcol and krow for the various keys of the keyboard? I know kcol 4 and krow 9 are the "coordinates" for the Menu key. But the "columns" and "rows" system doesn't look like it follows the order of the keys in the keyboard, or else I'm very dumb and not seeing it.
Anticipated regards