53
53
* number part is 0x1000000 and the value part is 0xuvwxyz. Else, the command
54
54
* part is held by bits 28-8 and the value part is held by bits 7-0. This
55
55
* permits to easily handle usual cases like 0x00xy (latin1), 0x01xy (latin2),
56
* 0xff08 (backspace), 0xff09 (tab), ...
56
* XK_Backspace (0xff08, backspace), XK_Tab (0xff09, tab), ...
58
* For instance, if key == 0x20010008,
59
* - key & BRLAPI_KEY_TYPE_MASK == BRLAPI_KEY_TYPE_CMD, so it's a braille
58
* For instance, if key == 0x0000000020010008,
59
* - (key & BRLAPI_KEY_TYPE_MASK) == BRLAPI_KEY_TYPE_CMD, so it's a braille
61
* - key & BRLAPI_KEY_CMD_BLK_MASK == BRLAPI_KEY_CMD_ROUTE, so it's the braille
63
* - key & BRLAPI_KEY_CMD_ARG_MASK == 8, so the highlighted cell is the 9th one
64
* (cells are numbered from 0)
65
* - key & BRLAPI_KEY_FLAGS_MASK == 0, so no modifier key was pressed during the
66
* command, and no particular flag applies to the command.
61
* - (key & BRLAPI_KEY_CMD_BLK_MASK) == BRLAPI_KEY_CMD_ROUTE, so it's the
62
* braille route command.
63
* - (key & BRLAPI_KEY_CMD_ARG_MASK) == 8, so the highlighted cell is the 9th
64
* one (cells are numbered from 0)
65
* - (key & BRLAPI_KEY_FLAGS_MASK) == 0, so no modifier key was pressed during
66
* the command, and no particular flag applies to the command.
68
* if key == 0x000000010000FF09,
69
* - (key & BRLAPI_KEY_TYPE_MASK) == BRLAPI_KEY_TYPE_SYM, so it's a keysym
70
* - (key & BRLAPI_KEY_CODE_MASK) == XK_Tab, so it's the tab key.
71
* BRLAPI_KEY_SYM_TAB can also be used here, as well as a few other
72
* BRLAPI_KEY_SYM_* constants which are provided to avoid having to include
74
* - (key & BRLAPI_KEY_FLAGS_MASK) == BRLAPI_KEY_FLG_SHIFT, so the shift
75
* modifier was pressed during the command.
77
* in the X11 standard some keysyms are directly unicode, for instance if
78
* key == 0x0000000001001EA0,
79
* - (key & BRLAPI_KEY_TYPE_MASK) == BRLAPI_KEY_TYPE_SYM, so it's a keysym
80
* - (key & BRLAPI_KEY_SYM_UNICODE) != 0 so it's a unicode keysym, whose value
81
* is key & (BRLAPI_KEY_SYM_UNICODE-1). Of course, one can also consider
82
* (key & BRLAPI_KEY_CODE_MASK) == XK_Abelowdot
83
* - (key & BRLAPI_KEY_FLAGS_MASK) == 0, so no modifier key was pressed during
84
* the command, and no particular flag applies to the command.
68
86
* The brlapi_expandKeyCode() function may be used for splitting key codes into
72
90
typedef uint64_t brlapi_keyCode_t;