PaperWM
PaperWM copied to clipboard
Show mnemonics in the topbar when pressing Super
When pressing Super we should show hints in at least the topbar (sems like that's what the gnome people are calling it). So eg. an M beside the calendar popdown.
Note: To bind modifier-only keybindings simply use the keysym as if it was a regular key. (eg. Super_L not <Super>)
It's possible to use Gdk.Keymap to detect both keydown and keyup for modifers.
const keymap = Gdk.Keymap.get_default();
keymap.connect('state_changed', () => {
keymap.get_modifier_state() & Gdk.ModifierType.CONTROL_MASK
});
Ref: https://github.com/sneetsher/keyboard_modifiers_status
Edit: WIP branch for general modifer tracking: https://github.com/paperwm/PaperWM/tree/modifier-tracker