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:
xcapeAUR 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/windowskey withalt/meta - when
capslkis held, it acts asctrl; when tapped, it acts asesc - the
/+?key acts normally when tapped, but acts as a right-hand sidesupermodifier key when held - the
\+|key acts normally when tapped, but acts as a right-hand sidectrlmodifier when held - the left-hand
superacts as the normalsupermodifier key when held, but triggers theF12key when tapped. I use this to toggle a quake-like terminal window. - the left-hand
ctrlacts as the normalctrlmodifier key when held, but triggers the (completely chosen-at-random)XF86Documentskey when tapped. I’ve boundXF86Documentsto Wavebox, my Electron multi-chat client, but you could make it act as a toggling hotkey for any app.