1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-10 08:10:21 -08:00
emacs/lisp/term/linux.el
Alan Mackenzie 1d012e0a62 Linux console: don't translate ESC TAB to `backtab' in input-decode-map.
This translation happened after the terminfo entry for <shift>TAB in the linux
section was changed to kcbt=\E^I in ncurses version 6.3.

* lisp/term/linux.el (terminal-init-linux): Add a define-key form to remove
the entry for "\e\t" from input-decode-map.

* etc/PROBLEMS: Add a new section under "character terminals" about S-TAB
wrongly doing the same thing as M-TAB, giving tips about amending the Linux
keyboard layout.
2022-05-08 11:39:45 +00:00

33 lines
921 B
EmacsLisp

;;; linux.el -*- lexical-binding:t -*-
;; The Linux console handles Latin-1 by default.
(declare-function gpm-mouse-enable "t-mouse" ())
(defun terminal-init-linux ()
"Terminal initialization function for linux."
(unless (terminal-coding-system)
(set-terminal-coding-system 'iso-latin-1))
;; It can't really display underlines.
(tty-no-underline)
;; Compositions confuse cursor movement.
(setq-default auto-composition-mode "linux")
(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.
;; The arg only matters in that it is not t or nil.
(set-input-meta-mode 'iso-latin-1))
(provide 'term/linux)
;;; linux.el ends here