How to set global key shortcuts in Wayland Or how to make your drop-down terminal work again with Grave key
If you're a dropdown terminal person, you know the deal: one key, instant access, no friction. I've used the grave key (`) to show and hide my terminal for as long as I can remember. Then Wayland came along and decided that key is off-limits for global shortcuts. Relearning decades of muscle memory wasn't an option, so I found a workaround.
The fix
Install Input Remapper, a tool that intercepts your keystrokes at the device level, before Wayland gets a say.
sudo apt install input-remapper
sudo input-remapper-gtk
Open the app, find your physical keyboard in the device list, and set the grave key to remap to a safe shortcut that Wayland does allow as a global hotkey, something like Ctrl+F1. Then go into your dropdown terminal settings and bind that same shortcut to toggle visibility. The chain works: you press grave, Input Remapper turns it into Ctrl+F1, your terminal responds.
One more thing
Since you're remapping the grave key entirely, you'll lose the ability to type a grave or tilde normally. Fix that by adding two extra remaps in Input Remapper: Shift+grave to output a grave, and Alt+grave to output a tilde. Not perfect, but it gets the job done without giving up your muscle memory.
Comments