Created
October 14, 2019 18:21
-
-
Save typester/7b688cdbc72d1e42d23241316e85dde3 to your computer and use it in GitHub Desktop.
my hhkb settings
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 | |
set -e | |
# reset | |
pkill xcape | echo -n | |
setxkbmap -layout us | |
# SandS | |
xmodmap -e 'keycode 255=space' | |
xmodmap -e 'keycode 65=Shift_L' | |
xcape -e '#65=space' | |
# set HHKB keys to super | |
xmodmap -e 'keycode 102 = Super_L' | |
xmodmap -e 'keycode 100 = Super_R' | |
# # Right alt to mod4 | |
xmodmap -e 'clear mod1' | |
xmodmap -e 'keycode 108 = Super_L' | |
xmodmap -e 'add mod1 = Alt_L' | |
xmodmap -e 'add mod1 = Meta_L' | |
# swap \ and BS | |
xmodmap -e 'keycode 22 = backslash bar' | |
xmodmap -e 'keycode 51 = BackSpace' | |
# swap Esc and ` | |
xmodmap -e 'keycode 9 = grave asciitilde' | |
xmodmap -e 'keycode 49 = Escape' | |
# set keyrate | |
xset r rate 200 100 |
Your welcome 👍
However, if you do not use xcape
command, you should also comment out a couple of lines above the xcape
line.
Otherwise, the space key will not work properly.
it seems that I only need these two lines:
xmodmap -e 'keycode 102 = Super_L'
xmodmap -e 'keycode 100 = Super_R'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks a lot for this script!
it made my keyboard works well in CentOS.
I have to comment out the xcap line though since my workstation do not have this command.