LinuxCommandLibrary

dumpkeys

TLDR

Dump current keymap

$ dumpkeys
copy
Dump in full format
$ dumpkeys --full-table
copy
Show only key definitions
$ dumpkeys --keys-only
copy
Dump function key strings
$ dumpkeys --funcs-only
copy
Output in C format
$ dumpkeys -c
copy
Save keymap to file
$ dumpkeys > [keymap.map]
copy

SYNOPSIS

dumpkeys [options]

DESCRIPTION

dumpkeys outputs the current keyboard translation tables used by the Linux console. The output format is compatible with loadkeys, allowing keymaps to be saved, modified, and restored.
The command reads from the kernel's keyboard driver and produces a keymap file showing what actions are bound to each key and modifier combination. This is used for console keyboard customization.

PARAMETERS

-f, --full-table

Output all key bindings, not just modified.
-k, --keys-only
Output only key bindings, not function strings.
--funcs-only
Output only function key strings.
-c, --cformat
Output in C source format.
-1, --separate-lines
One action per line.
-S shape
Output shape: 0, 1, or 2.
-n, --numeric
Output keycodes numerically.
-i, --short-info
Display kernel keymap information.
-l, --long-info
Display detailed keymap information.

OUTPUT FORMAT

$ keycode  28 = Return
keycode  57 = space
keycode  14 = Delete BackSpace
shift keycode  14 = Delete
copy

CAVEATS

Only works on Linux console, not X11 or Wayland. Requires access to console device. Output format varies with options. Virtual terminals share the same keymap. Use loadkeys to restore or modify keymaps.

HISTORY

dumpkeys is part of the kbd package for Linux console keyboard utilities. It has been included in Linux distributions since the early 1990s as a companion to loadkeys, providing a way to export and backup keyboard configurations.

SEE ALSO

Copied to clipboard