-
Notifications
You must be signed in to change notification settings - Fork 23
Keyboard layout switching
r0adrunner edited this page Sep 21, 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 it is run:
#!/bin/sh
if [ "`setxkbmap -query | awk 'END{print }' | 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"
exit 0