fix: C-i in KKP supported terminals
"C-i" and "TAB" are equivalent to Emacs. In GUI Emacs, we can bind to [tab] instead of "TAB", permitted users to treat the two keys differently. However, [tab] is unavailable in TTY frames, so there was no avoiding sacrificing C-i keybinds there. With KKP support, though, that's no longer the case.
This commit is contained in:
parent
0a38eeef4c
commit
538ddf5e66
2 changed files with 28 additions and 22 deletions
|
@ -57,4 +57,14 @@
|
|||
[M-return] (kbd "M-RET")
|
||||
[M-tab] (kbd "M-TAB")
|
||||
[M-backspace] (kbd "M-DEL")
|
||||
[M-delete] (kbd "M-DEL")))
|
||||
[M-delete] (kbd "M-DEL"))
|
||||
|
||||
;; HACK: Allow C-i to function independently of TAB in KKP-supported
|
||||
;; terminals. Requires the `input-decode-map' entry in
|
||||
;; lisp/doom-keybinds.el.
|
||||
(define-key! key-translation-map
|
||||
[?\C-i] (cmd! (if-let (((kkp--terminal-has-active-kkp-p))
|
||||
(keys (this-single-command-raw-keys))
|
||||
((> (length keys) 2))
|
||||
((equal (cl-subseq keys -3) [27 91 49])))
|
||||
[C-i] [?\C-i]))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue