winkeys.h File Reference

Window system keyboard events. More...

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.


Detailed Description

Window system keyboard events.

These functions provide the basis of the HPGCC window system's keyboard support.

Definition in file winkeys.h.


Define Documentation

#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.

Definition at line 116 of file winkeys.h.

#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.

Warning:
Consuming events of this type can interfere with the operation of the shift keys.

Definition at line 65 of file winkeys.h.

#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.

Warning:
Consuming events of this type can interfere with the operation of the shift keys.

Definition at line 80 of file winkeys.h.

#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.

See also:
win_keytyped_t

Definition at line 102 of file winkeys.h.

#define WIN_KEYSTATE_ON   1

Constant for a shift key that is active.

Note:
In most cases, applications should test for shift > 0 rather that comparing the shift state against this constant. Other non-zero values, such as locked, are generally equivalent.

Definition at line 158 of file winkeys.h.

#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.)

Definition at line 130 of file winkeys.h.

#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.)

Definition at line 144 of file winkeys.h.


Generated on Fri Feb 16 16:43:17 2007 for HPGCCWindows by  doxygen 1.5.0