Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 758 Bytes

File metadata and controls

23 lines (13 loc) · 758 Bytes

Getting key codes

Simple run xev in a terminal, focus the window and press the key. Key codes will be given on stdout.

Print active keyboard layout

 setxkbmap de -print | xkbcomp - - | xkbprint -color -o - - | ps2pdf - >layout.pdf

See xkbprint options to print Alt, AltGr, Ctrl layout levels.

Change keyboard mappings

 setxkbmap -query                                 # show current mapping
 setxkbmap -option "ctrl:swap_lalt_lctl"          # swap 2 keys
 setxkbmap -option ""                             # reset all mappings

Show current systemd based persistent mappings

 localectl

Persist with systemd

 localectl set-x11-keymap <options>               # persist options as printed by 'setxkbmap -query'