Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Switch layout of keyboard in X11
# switch keyboardlayout of my external cherry keyboard to german layout
set -e
DEV_NAME="HID 046a:0023"
DEV_ID=`xinput list --id-only "keyboard:$DEV_NAME"`
exec setxkbmap -device $DEV_ID -layout $LAYOUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment