table of contents
other versions
- wheezy 1:1.0.2-4.1
gii_key_event(3) | GGI | gii_key_event(3) |
NAME¶
gii_key_event - LibGII key eventsSYNOPSIS¶
#include <ggi/events.h> typedef struct gii_key_event { COMMON_DATA; uint32_t modifiers; uint32_t sym; uint32_t label; uint32_t button; } gii_key_event;
DESCRIPTION¶
The gii_key_event structure represents key/button events from keyboards and other devices.GENERATED EVENTS¶
- evKeyPress
- The key specified in the structure is pressed. Not
repeatedly produced while holding down the key.
- evKeyRelease
- A key specified in the structure is released.
- evKeyRepeat
- Makes sense when dealing with character input. A key is
being held down and the character should be processed at intervals when
the key is held down.
STRUCTURE MEMBERS¶
- modifiers
- Result of bitwise-or of the following flags, indicating certain shift states:
- •
- GII_MOD_SHIFT
- •
- GII_MOD_CTRL
- •
- GII_MOD_ALT
- •
- GII_MOD_META
- •
- GII_MOD_SUPER
- •
- GII_MOD_HYPER
- •
- GII_MOD_ALTGR
- •
- GII_MOD_CAPS
- •
- GII_MOD_NUM
- •
- GII_MOD_SCROLL
- sym
- The symbol of the key, which is the resultant
character produced by the key. This is roughly a transformation of the
label with the current modifiers. It also depends on the
user's key configuration.
- label
- The actual label visible on the key in question. This is either the symbol produced when there are no modifiers or it is the most prominent symbol on that key. For example:
- •
- The numeric keys on top of the letter keys on a standard PC keyboard have label values which are the digit characters in ASCII.
- •
- The English letter keys on a keyboard are represented by A through Z in label. Although in their unshifted state these keys produce lowercase letters, the keycaps are printed with uppercase by convention, so this is what LibGII returns.
- button
- The button number distinguishing between the different
buttons on the device. For example, on a keyboard it is a number from 0 to
127 (i.e. a scancode), on a joystick it might be 1 to 4, and on a spaceorb
it will be 1 to 8.
GGI KEYSYM SYSTEM¶
In GGI, key values are defined in ggi/keyboard.h. They are basically Unicode characters with some extensions:Important: In the LibGII system, no key
is guaranteed to exist; the key values are for identification only.
Particularly, applications should not rely on their presence. Also,
because not all keyboards are configured in the same way, applications are
encouraged to allow user configuration of the keys used and not hard-code
their values.
SEE ALSO¶
gii_event(3)2006-12-30 | libgii-1.0.x |