Bind keys 'DEL' and 'M-DEL' keys
* eat.el (eat-term-input-event): Handle 'DEL' and 'M-DEL' keys. * eat.el (eat-term-make-keymap): Bind 'DEL' and 'M-DEL' keys.
This commit is contained in:
parent
64dcbd2c07
commit
79784b70ef
1 changed files with 9 additions and 7 deletions
16
eat.el
16
eat.el
|
@ -4036,11 +4036,14 @@ client process may get confused."
|
||||||
('home ?H)
|
('home ?H)
|
||||||
('end ?F)
|
('end ?F)
|
||||||
(_ ?~)))))
|
(_ ?~)))))
|
||||||
('backspace
|
((or 'backspace ?\C-?)
|
||||||
(send "\C-?"))
|
(send "\C-?"))
|
||||||
('C-backspace
|
('C-backspace
|
||||||
(send "\C-h"))
|
(send "\C-h"))
|
||||||
('M-backspace
|
((or 'M-backspace
|
||||||
|
(pred (lambda (ev)
|
||||||
|
(and (= (event-basic-type ev) ?\C-?)
|
||||||
|
(equal (event-modifiers ev) '(meta))))))
|
||||||
(send "\e\C-?"))
|
(send "\e\C-?"))
|
||||||
('C-M-backspace
|
('C-M-backspace
|
||||||
(send "\e\C-h"))
|
(send "\e\C-h"))
|
||||||
|
@ -4300,7 +4303,7 @@ CATEGORIES is a list whose elements should be a one of the following
|
||||||
keywords:
|
keywords:
|
||||||
|
|
||||||
`:ascii' All self-insertable characters, plus
|
`:ascii' All self-insertable characters, plus
|
||||||
`backspace', `insert', `delete' and
|
`backspace', `DEL', `insert', `delete' and
|
||||||
`deletechar' keys, with all possible
|
`deletechar' keys, with all possible
|
||||||
modifiers.
|
modifiers.
|
||||||
`:arrow' Arrow keys with all possible modifiers.
|
`:arrow' Arrow keys with all possible modifiers.
|
||||||
|
@ -4319,11 +4322,10 @@ EXCEPTIONS is a list of key sequences to not bind. Don't use
|
||||||
(unless (member key exceptions)
|
(unless (member key exceptions)
|
||||||
(define-key map key input-command))))
|
(define-key map key input-command))))
|
||||||
(when (memq :ascii categories)
|
(when (memq :ascii categories)
|
||||||
;; Bind ASCII and self-insertable characters except ESC and
|
;; Bind ASCII and self-insertable characters except ESC.
|
||||||
;; DEL.
|
|
||||||
(bind [remap self-insert-command])
|
(bind [remap self-insert-command])
|
||||||
(cl-loop
|
(cl-loop
|
||||||
for i from ?\C-@ to ?~
|
for i from ?\C-@ to ?\C-?
|
||||||
do (unless (= i meta-prefix-char)
|
do (unless (= i meta-prefix-char)
|
||||||
(bind (vector i))))
|
(bind (vector i))))
|
||||||
;; Bind `backspace', `delete', `deletechar', and all modified
|
;; Bind `backspace', `delete', `deletechar', and all modified
|
||||||
|
@ -4346,7 +4348,7 @@ EXCEPTIONS is a list of key sequences to not bind. Don't use
|
||||||
(define-key map (vector meta-prefix-char)
|
(define-key map (vector meta-prefix-char)
|
||||||
(make-sparse-keymap))
|
(make-sparse-keymap))
|
||||||
(cl-loop
|
(cl-loop
|
||||||
for i from ?\C-@ to ?~
|
for i from ?\C-@ to ?\C-?
|
||||||
do (unless (memq i '(?O ?\[))
|
do (unless (memq i '(?O ?\[))
|
||||||
(bind (vector meta-prefix-char i))))
|
(bind (vector meta-prefix-char i))))
|
||||||
(bind (vector meta-prefix-char meta-prefix-char))))
|
(bind (vector meta-prefix-char meta-prefix-char))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue