|KBDINFO(1)||General Commands Manual||KBDINFO(1)|
kbdinfo - read information about keyboard state
kbdinfo [options] getmode
kbdinfo [options] gkbmode [raw|xlate|mediumraw|unicode]
kbdinfo [options] gkbmeta [metabit|escprefix]
kbdinfo [options] gkbled [scrolllock|numlock|capslock]
The utility allows you to read and check various parameters of the keyboard and virtual console.
- Raw (scancode) mode. These are the raw codes generated by the keyboard.
- Medium raw (scancode) mode. This is extended medium raw mode, with keys above 127 encoded as 0, high 7 bits, low 7 bits, with the 0 bearing the 'up' flag if needed. 0 is reserved, so this shouldn't interfere with anything else. The two bytes after 0 will always have the up flag set not to interfere with older applications. This allows for 16384 different keycodes, which should be enough.
- Translate keycodes using keymap. These are the codes generated via the current keysym mapping.
- Unicode mode.
- Gets meta key handling mode.
- Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
Written by Alexey Gladkov.