KBDINFO(1) General Commands Manual KBDINFO(1)

# [NAME](#NAME)

kbdinfo - read information about keyboard state

# [SYNOPSIS](#SYNOPSIS)

**kbdinfo** \[*options*] *getmode* \[*text|graphics*]  
**kbdinfo** \[*options*] *gkbmode* \[*raw|xlate|mediumraw|unicode*]  
**kbdinfo** \[*options*] *gkbmeta* \[*metabit|escprefix*]  
**kbdinfo** \[*options*] *gkbled* \[*scrolllock|numlock|capslock*]

# [DESCRIPTION](#DESCRIPTION)

The utility allows you to read and check various parameters of the keyboard and virtual console.

[**getmode**](#getmode)

Get or check virtual console mode.

[**gkbmode**](#gkbmode)

Gets current keyboard mode.

[**raw**](#raw)

Raw (scancode) mode. These are the raw codes generated by the keyboard.

[**mediumraw**](#mediumraw)

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.

[**xlate**](#xlate)

Translate keycodes using keymap. These are the codes generated via the current keysym mapping.

[**unicode**](#unicode)

Unicode mode.

[**gkbmeta**](#gkbmeta)

Gets meta key handling mode.

[**escprefix**](#escprefix)

Specifies if pressing the meta (alt) key generates an ESC (\\033) prefix followed by the keysym.

[**metabit**](#metabit)

The keysym marked with the high bit set.

[**gkbled**](#gkbled)

Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).

[**scrolllock**](#scrolllock)

The scroll lock is down.

[**numlock**](#numlock)

The num lock is down.

[**capslock**](#capslock)

The caps lock is down.

# [OPTIONS](#OPTIONS)

[**-C**, **--console**=*DEV*](#C)

the console device to be used.

[**-V**, **--version**](#V)

print version number.

[**-h**, **--help**](#h)

print this usage message.

# [AUTHORS](#AUTHORS)

Written by Alexey Gladkov.

# [SEE ALSO](#SEE_ALSO)

[**kbdrate**(1)](/man/os/kbd/kbdrate.1), [**setleds**(1)](/man/os/kbd/setleds.1), [**kbd\_mode**(1)](/man/os/kbd/kbd_mode.1)

June 2019 kbd

---

Document: kbdinfo(1) from kbd 2.10.0-r3 (Chainguard OS)
Source: https://github.com/legionus/kbd
