I wanted to share the simple bash script I’ve created which allows better use of the bottom row of the MPC.
The script requires xmodmap
and xcape
. xcape
is not a standard install, but can be installed with:
- Arch:
xcape
AUR package - Ubuntu:
sudo apt install xcape
The script is split into functions which have been described and can be used a la carte as needed. Essentially, this script:
- “resets” the keyboard by resetting the layout and killing existing entries of
xcape
- swaps the
super
/windows
key withalt
/meta
- when
capslk
is held, it acts asctrl
; when tapped, it acts asesc
- the
/
+?
key acts normally when tapped, but acts as a right-hand sidesuper
modifier key when held - the
\
+|
key acts normally when tapped, but acts as a right-hand sidectrl
modifier when held - the left-hand
super
acts as the normalsuper
modifier key when held, but triggers theF12
key when tapped. I use this to toggle a quake-like terminal window. - the left-hand
ctrl
acts as the normalctrl
modifier key when held, but triggers the (completely chosen-at-random)XF86Documents
key when tapped. I’ve boundXF86Documents
to Wavebox, my Electron multi-chat client, but you could make it act as a toggling hotkey for any app.