Skip to content

Instantly share code, notes, and snippets.

@dbasedow
Created March 5, 2020 15:43
Show Gist options
  • Save dbasedow/e5f1a1f41e0d27a9570ba3f6e03cdc61 to your computer and use it in GitHub Desktop.
Save dbasedow/e5f1a1f41e0d27a9570ba3f6e03cdc61 to your computer and use it in GitHub Desktop.
Use multiple keyboards with different layouts at the same time
setxkbmap_by_name() {
ID=`xinput -list --id-only "$1"`
shift 2
`setxkbmap -device $ID "$@"`
}
setxkbmap_by_name "daskeyboard" -layout de
setxkbmap_by_name "Topre Corporation HHKB Professional" -layout us
xmodmap -e 'keycode 100 = Super_R' && xset -r 100
xmodmap -e 'keycode 102 = Super_L' && xset -r 102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment