[LINUX] Making better use of the bottom keyboard row

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 with alt/meta
  • when capslk is held, it acts as ctrl; when tapped, it acts as esc
  • the /+? key acts normally when tapped, but acts as a right-hand side super modifier key when held
  • the \+| key acts normally when tapped, but acts as a right-hand side ctrl modifier when held
  • the left-hand super acts as the normal super modifier key when held, but triggers the F12 key when tapped. I use this to toggle a quake-like terminal window.
  • the left-hand ctrl acts as the normal ctrl modifier key when held, but triggers the (completely chosen-at-random) XF86Documents key when tapped. I’ve bound XF86Documents to Wavebox, my Electron multi-chat client, but you could make it act as a toggling hotkey for any app.



1 Like

Hi Josh, you write about ctrl, but the function in the script is called alt_to_chat… and maps Alt_L=XF86Documents. In the MATE the switched Alt still opens “Start Menu” like SuperL, although in the Keyboard Shortcuts it acts as AltL. Please, what key-name should be written in Wavebox for toggling? (Thank you for bringing Wavebox to me, I paid for it.)