Skip to content

Instantly share code, notes, and snippets.

@staybuzz
Last active August 29, 2015 14:03
Show Gist options
  • Save staybuzz/9c0bfa12c03012722e6a to your computer and use it in GitHub Desktop.
Save staybuzz/9c0bfa12c03012722e6a to your computer and use it in GitHub Desktop.
#!/bin/sh
# for centos 6.5
echo 'CapsLock to Control for jp106'
if [ $UID -ne 0 ]
then
echo "require root privilege"
exit 1
fi
cp /lib/kbd/keymaps/i386/qwerty/jp106.map.gz{,.org}
gzip -d /lib/kbd/keymaps/i386/qwerty/jp106.map.gz
sed -i -e "s/Caps_Lock/Control/g" /lib/kbd/keymaps/i386/qwerty/jp106.map
gzip /lib/kbd/keymaps/i386/qwerty/jp106.map
loadkeys jp106
echo 'Finish!'
echo 'Original jp106 keymap backed up!'
echo '/lib/kbd/keymaps/i386/qwerty/jp106.map.gz.org'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment