DMCP interface
03.15_020
|
Basic keyboard functions. More...
Functions | |
int | key_empty () |
Check whether key buffer is empty. More... | |
int | key_push (int k1) |
Push key at the end of key buffer. More... | |
int | key_tail () |
Check for key in key buffer. More... | |
int | key_pop () |
Remove and return next key from key buffer. More... | |
void | key_pop_all () |
Remove all keys from key buffer. | |
int | key_to_nr (int key) |
Returns corresponding number for key code key . More... | |
int | sys_last_key () |
Returns currently pressed key code. More... | |
void | wait_for_key_press () |
Wait for key press. More... | |
void | wait_for_key_release (int tout) |
Wait for key release or timeout. More... | |
Basic keyboard functions.
int key_empty | ( | ) |
Check whether key buffer is empty.
int key_pop | ( | ) |
Remove and return next key from key buffer.
int key_push | ( | int | k1 | ) |
Push key at the end of key buffer.
k1 | Key to store |
int key_tail | ( | ) |
Check for key in key buffer.
int key_to_nr | ( | int | key | ) |
Returns corresponding number for key code key
.
key
corresponds to KEY_0 .. KEY_9 (respectively) or -1 if key
isn't a number key int sys_last_key | ( | ) |
Returns currently pressed key code.
void wait_for_key_press | ( | ) |
Wait for key press.
First waits for key release, then for key press and release.
Function also exits if the key isn't pressed after AUTO_OFF_MENU timeout.
void wait_for_key_release | ( | int | tout | ) |
Wait for key release or timeout.
tout | [1/100s] Timeout or 0 to wait until key is released. |