From d46a2fa319808963bbe8d3a90e7dbb13fcd844f5 Mon Sep 17 00:00:00 2001 From: Al Petrofsky Date: Fri, 16 Jun 2023 20:06:57 -0400 Subject: [PATCH] Make C-SPC work in "M-x term" * lisp/term.el (term-raw-map): Add bindings for C-SPC, C-M-SPC, and C-M-/. (term-send-C-@, term-send-C-M-_, term-send-C-M-@): New commands. (Bug#64121) --- lisp/term.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/term.el b/lisp/term.el index e1392908b90..73f583ff718 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -948,6 +948,9 @@ underlying shell." (define-key map [next] 'term-send-next) (define-key map [xterm-paste] #'term--xterm-paste) (define-key map [?\C-/] #'term-send-C-_) + (define-key map [?\C- ] #'term-send-C-@) + (define-key map [?\C-\M-/] #'term-send-C-M-_) + (define-key map [?\C-\M- ] #'term-send-C-M-@) (when term-bind-function-keys (dotimes (key 21) @@ -1411,6 +1414,9 @@ Entry to this mode runs the hooks on `term-mode-hook'." (defun term-send-del () (interactive) (term-send-raw-string "\e[3~")) (defun term-send-backspace () (interactive) (term-send-raw-string "\C-?")) (defun term-send-C-_ () (interactive) (term-send-raw-string "\C-_")) +(defun term-send-C-@ () (interactive) (term-send-raw-string "\C-@")) +(defun term-send-C-M-_ () (interactive) (term-send-raw-string "\e\C-_")) +(defun term-send-C-M-@ () (interactive) (term-send-raw-string "\e\C-@")) (defun term-send-function-key () "If bound to a function key, this will send that key to the underlying shell." -- 2.39.2