diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-08-25 18:27:35 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-08-25 18:27:35 -0400 |
commit | 3b66c4d8f0966838f4fad1314da105a5fbc4f501 (patch) | |
tree | bf0db44a5d2cf11d82b6d2449628f265a0105fe9 /lisp/term | |
parent | 46ff443dc0657105213354be12f2d3b97a2538b2 (diff) | |
download | emacs-3b66c4d8f0966838f4fad1314da105a5fbc4f501.tar.gz |
* lisp/term/xterm.el (xterm-function-map): Map `\e[29~` to `menu`
Diffstat (limited to 'lisp/term')
-rw-r--r-- | lisp/term/xterm.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el index e63bf36cc3d..43a89ff31f7 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]) |