susam / devil

Emacs minor mode that intercepts and translates keystrokes to provide a modifier-free non-modal editing experience
https://susam.github.io/devil/
Other
169 stars 10 forks source link

Special handling for `C-g` keyboard-quit #12

Open dpassen opened 1 year ago

dpassen commented 1 year ago

When using devil-mode, I can use C-g to interrupt a command key sequence. For example, , x p C-g will abandon the projectile command I was going to use before I changed my mind. But I can not use , x p , g even though , g maps to C-g. Obviously, I can continue to use C-g but is there a more 'devilish' way to do so?

corytertel commented 1 year ago

I believe a good solution would be to have a glob for translations. That way sequences like (cons "%* %k g" "C-g") in devil-translations will make it so that every time you press g in the middle of a devil key sequence the sequence will be interrupted.

Another solution could be to add a devil-escape-key so that way every time a key like g is hit, the sequence dies.