Skip to content

Keyboard layout switching

r0adrunner edited this page Sep 3, 2012 · 6 revisions

If you need to change the keyboard layout, here is a script to do that: This one changes the KB between the brazilian and american layout every time the script is run:

#!/bin/sh if [ "setxkbmap -query | awk 'END{print $2}' | grep us`" ]; then setxkbmap -layout br else setxkbmap -layout us fi

Put here your custom xmodmap config, if any

#${HOME}/.xmodmap.sh

xmodmap -e "keycode 65 = Control_L Control_L Control_L Control_L Control_L Control_L Control_L Control_L" xmodmap -e "keycode 255 = space VoidSymbol VoidSymbol VoidSymbol VoidSymbol" xmodmap -e "add control = Control_L"`

Clone this wiki locally