Last active
August 29, 2015 14:03
-
-
Save staybuzz/9c0bfa12c03012722e6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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