Go to the source code of this file.
Data Structures | |
struct | win_keytyped_t |
Event data for WIN_KEY_TYPED events. More... | |
Defines | |
#define | WIN_KEY_PRESSED 1 |
Event number for key pressed events. | |
#define | WIN_KEY_RELEASED 2 |
Event number for key released events. | |
#define | WIN_KEY_TYPED 3 |
Event number for key typed events. | |
#define | WIN_ALPHA_CHANGED 4 |
Event number for changes in the alpha key's state. | |
#define | WIN_LSHIFT_CHANGED 5 |
Event number for changes in the left shift key's state. | |
#define | WIN_RSHIFT_CHANGED 6 |
Event number for changes in the right shift key's state. | |
#define | WIN_KEYSTATE_OFF 0 |
Constant for a shift key that is not active. | |
#define | WIN_KEYSTATE_ON 1 |
Constant for a shift key that is active. | |
#define | WIN_KEYSTATE_LOCK 2 |
Constant for a shift key that is locked. | |
#define | WIN_KEYSTATE_PRESSED 3 |
Constant for a shift key that is being held down. |
These functions provide the basis of the HPGCC window system's keyboard support.
Definition in file winkeys.h.
#define WIN_ALPHA_CHANGED 4 |
Event number for changes in the alpha key's state.
An alpha changed event occurs whenever the state of the alpha key is changed. This is a high-level event involving the interpretation of keys. It only operates for key events that were not consumed by handlers for WIN_KEY_PRESSED and WIN_KEY_RELEASED.
The event data field for this event type is one of the key state constants, WIN_KEYSTATE_OFF, WIN_KEYSTATE_ON, WIN_KEYSTATE_LOCK, or WIN_KEYSTATE_PRESSED.
#define WIN_KEY_PRESSED 1 |
Event number for key pressed events.
A key pressed event occurs whenever the user presses any key on the keyboard.
The event data field for this event type is an int
containing the key code for the key that was pressed. The key code is a constant defined in hpkeyb49.h
and beginning with the KB_
prefix.
#define WIN_KEY_RELEASED 2 |
Event number for key released events.
A key released event occurs whenever the user releases any key on the keyboard.
The event data field for this event type is an int
containing the key code for the key that was pressed. The key code is a constant defined in hpkeyb49.h
and beginning with the KB_
prefix.
#define WIN_KEY_TYPED 3 |
Event number for key typed events.
A key typed event occurs whenever a keypress should be handled at the application level. This is a higher-level event than key pressed, and more suitable for application tasks. Key typed events are generated for key presses that were not consumed by a WIN_KEY_PRESSED handler, and which are not shift keys. Unlike WIN_KEY_PRESSED, the event field for this event contains semantic information like the logical shift key state and equivalent ASCII character.
This event is not generated for shift keys (left shift, right shift, and alpha). To detect actions on these keys, see the WIN_ALPHA_CHANGED, WIN_LSHIFT_CHANGED, and WIN_RSHIFT_CHANGED events.
The event data field for this event type is a pointer to win_keytyped_t, which contains a variety of information about the event.
#define WIN_KEYSTATE_ON 1 |
#define WIN_LSHIFT_CHANGED 5 |
Event number for changes in the left shift key's state.
A left shift changed event occurs whenever the state of the left shift key is changed. This is a high-level event involving the interpretation of keys. It only operates for key events that were not consumed by handlers for WIN_KEY_PRESSED and WIN_KEY_RELEASED.
The event data field for this event type is one of the key state constants, WIN_KEYSTATE_OFF, WIN_KEYSTATE_ON, or WIN_KEYSTATE_PRESSED. (The semantics for left shift dictate that it can never be locked.)
#define WIN_RSHIFT_CHANGED 6 |
Event number for changes in the right shift key's state.
A right shift changed event occurs whenever the state of the right shift key is changed. This is a high-level event involving the interpretation of keys. It only operates for key events that were not consumed by handlers for WIN_KEY_PRESSED and WIN_KEY_RELEASED.
The event data field for this event type is one of the key state constants, WIN_KEYSTATE_OFF, WIN_KEYSTATE_ON, or WIN_KEYSTATE_PRESSED. (The semantics for right shift dictate that it can never be locked.)