emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3b66c4d: * lisp/term/xterm.el (xterm-function-map): Map `\e[29~`


From: Stefan Monnier
Subject: master 3b66c4d: * lisp/term/xterm.el (xterm-function-map): Map `\e[29~` to `menu`
Date: Wed, 25 Aug 2021 18:28:22 -0400 (EDT)

branch: master
commit 3b66c4d8f0966838f4fad1314da105a5fbc4f501
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/term/xterm.el (xterm-function-map): Map `\e[29~` to `menu`
---
 lisp/term/xterm.el | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index e63bf36..43a89ff 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -350,7 +350,20 @@ Return the pasted text as a string."
     (define-key map "\e[5;3~" [M-prior])
     (define-key map "\e[6;3~" [M-next])
 
-    (define-key map "\e[29~" [print])
+    ;; This escape sequence has a controversial story.
+    ;; It was initially mapped to [print] (initial commit by Karl Heuer),
+    ;; but we can't find any justification for it.
+    ;; Xterm uses this escape sequence for both `F16' and `Menu' keys,
+    ;; and the reason for it is that in the VT220 keyboard the key
+    ;; placed logically at position where `F16' would be (and sending
+    ;; the escape sequence that naturally belongs to `F16') was
+    ;; labeled `Menu'.  [ The story gets even more interesting if you
+    ;; want to dig deeper, e.g. some terminals would send that same
+    ;; escape sequence in response to `S-F4' (because they (ab)used
+    ;; the escape sequence of `F<n+12>' for `S-F<n>').  ]
+    ;; The current binding was chosen because current keyboards almost never
+    ;; have an `F16' key, whereas many do have a `Menu' key.
+    (define-key map "\e[29~" [menu])
 
     (define-key map "\eOj" [kp-multiply])
     (define-key map "\eOk" [kp-add])



reply via email to

[Prev in Thread] Current Thread [Next in Thread]