Make C-[ exit Helix state in GUI Emacs #1
Loading…
Reference in a new issue
No description provided.
Delete branch "helix-esc"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
In GUI Emacs, C-[ produces byte 27 (ESC) which is bound to the global
meta-prefix map, so it never fires our [escape] bindings even when
Helix's minor-mode keymaps are active. Adopt evil-mode's approach:
install a menu-item with a :filter in input-decode-map keyed on ?\e.
The filter waits helix-esc-delay seconds for a follow-up key and, if
none arrives while a Helix state is active, translates ESC to
[escape]. Otherwise it returns the original ESC prefix map so
ESC-as-meta (e.g. 'ESC x' for 'M-x') keeps working.