summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-05-09 06:30:28 +0200
committerStefan Kangas <stefan@marxist.se>2022-05-09 06:30:28 +0200
commit8343c2d5f6f470458bdedc3283d0e9beecb07620 (patch)
treeb14beb10d095e5620db776d6bf38b74537a2cabe
parent1a215357255004f2757d8d20dc0ecc61d29d93dc (diff)
parent1d012e0a621f9cf99048f57130144275b9025d1c (diff)
downloademacs-8343c2d5f6f470458bdedc3283d0e9beecb07620.tar.gz
Merge from origin/emacs-28
1d012e0a62 Linux console: don't translate ESC TAB to `backtab' in inp...
-rw-r--r--etc/PROBLEMS27
-rw-r--r--lisp/term/linux.el4
2 files changed, 31 insertions, 0 deletions
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 270de600d66..3e0b73a4d59 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -1874,6 +1874,33 @@ this, you can remove the X resource or put this in your init file:
(xterm-remove-modify-other-keys)
+** The shift TAB key combination works as meta TAB on a Linux console.
+
+This happens because on your keyboard layout, S-TAB produces the same
+keycodes as typing ESC TAB individually. The best way to solve this
+is to modify your keyboard layout to produce different codes, and tell
+Emacs what these new codes mean.
+
+The current keyboard layout will probably be a .map.gz file somewhere
+under /usr/share/keymaps. Identify this file, possibly from a system
+initialization file such as /etc/conf.d/keymaps. Run gunzip on it to
+decompress it, and amend the entries for keycode 15 to look something
+like this:
+
+keycode 15 = Tab
+ alt keycode 15 = Meta_Tab
+ shift keycode 15 = F219
+string F219 = "\033[4}\011" # Shift+<tab>
+
+After possibly saving this file under a different name, compress it
+again using gzip. Amend /etc/conf.d/keyamps, etc., if needed.
+Further details can be found in the man page for loadkeys.
+
+Then add the following line near the start of your site-start.el or
+.emacs or init.el file:
+
+(define-key input-decode-map "\e[4}\t" 'backtab)
+
** Emacs spontaneously displays "I-search: " at the bottom of the screen.
This means that Control-S/Control-Q (XON/XOFF) "flow control" is being
diff --git a/lisp/term/linux.el b/lisp/term/linux.el
index 6d43e477ac9..ab5a6d8698f 100644
--- a/lisp/term/linux.el
+++ b/lisp/term/linux.el
@@ -17,6 +17,10 @@
(ignore-errors (when gpm-mouse-mode (require 't-mouse) (gpm-mouse-enable)))
+ ;; Don't translate ESC TAB to backtab as directed
+ ;; by ncurses-6.3.
+ (define-key input-decode-map "\e\t" nil)
+
;; Make Latin-1 input characters work, too.
;; Meta will continue to work, because the kernel
;; turns that into Escape.