jbuchermn/newm

[Feature Request] Add the possibility of defining keychords

Closed this issue · 8 comments

One of my favorite features in StumpWM (my current X11 WM) and Emacs is the ability of defining keychords (although their definition in StumpWM is currently a bit awkward). Instead of every keybind immediately triggering something when pressed, some give access to extra keybinds. Qtile also allows for keychords, and i3 awkwardly does too through binding modes.

For instance, the keybind s-SPC a b reflects the keypress Super+Space, then a, then b, while the keybind s-SPC a g differs only by the last keypress.

This allows for a much wider amount of available keybinds and for much better mnemonics in the user’s configuration --the first keychord above is s-SPC the common keybind for most stuff, a for applications, and b for browser while the latter differs with g for GIMP.

It would be great if such a feature could be added to newm, I believe it would make it much more flexible, and it would help improve the mnemonics of its keybinds.

I like the idea (used to use Emacs myself, but also on vim I use a lot of keychord bindings).

This should not be too hard to implement (taking a look at https://github.com/jbuchermn/newm/blob/master/newm/key_processor.py) - I'll keep this in the backlog. Once the performance issues (#61) are solved, I'll take a closer look.

@jbuchermn I don't know if I have to see what I'm going to say but I'm left-handed and Latin American so it's very comfortable for me to use altgr in some cases instead of Mod and I would like to be able to assign it to some keyboard shortcuts

@Phundrak thanks

Defining keychords is possible since the latest commit, e.g. by ("L-a L-b", ...).

Edit: Adjusted "M" to "L" - as M isn't a modifier.

@CRAG666 can we close this issue?

Closing this now.