SandS memo
Table of Contents
SandS stands for Space-and-Shift.
- When you press and hold space key it acts as shift key.
- When you only press and release space key it acts as space key.
1 Prerequiste
- Fundamental compilation environment e.g.
make
,cc
git
2 Download xcape
Download xcape
to somewhere and install.
% cd somewhere-to-download % git clone https://github.com/alols/xcape.git % cd xcape % make && sudo make install % cd ../ % rm -rf xcape
3 Write script with xcape
Save shellscript to somewhere e.g. $HOME/sands.sh
.
#!/bin/sh # SandS configuration if pgrep -x xcape ; then killall xcape # to prevent xcape daemon duplication fi xmodmap -e 'keycode 255=space' xmodmap -e 'keycode 65=Shift_L' env xcape -e '#65=space'
Then add exec permission.
% chmod u+x sands.sh
4 Configure .xinitrc to load the script on X11 session starting up
Edit ~/.xinitrc
.
# append $HOME/sands.sh