1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-30 08:09:04 +00:00
emacs/lisp/term/lk201.el

92 lines
3.9 KiB
EmacsLisp
Raw Normal View History

;; -*- no-byte-compile: t -*-
1993-05-30 03:34:09 +00:00
;; Define function key sequences for DEC terminals.
(defvar lk201-function-map nil
"Function key definitions for DEC terminals.")
;; Make reloads faster.
(unless lk201-function-map
(setq lk201-function-map (make-sparse-keymap))
1993-05-30 03:34:09 +00:00
;; Termcap or terminfo should set these.
;; (define-key lk201-function-map "\e[A" [up])
;; (define-key lk201-function-map "\e[B" [down])
;; (define-key lk201-function-map "\e[C" [right])
;; (define-key lk201-function-map "\e[D" [left])
1993-07-21 21:44:24 +00:00
(define-key lk201-function-map "\e[1~" [find])
(define-key lk201-function-map "\e[2~" [insert])
(define-key lk201-function-map "\e[3~" [delete])
(define-key lk201-function-map "\e[4~" [select])
(define-key lk201-function-map "\e[5~" [prior])
(define-key lk201-function-map "\e[6~" [next])
(define-key lk201-function-map "\e[11~" [f1])
(define-key lk201-function-map "\e[12~" [f2])
(define-key lk201-function-map "\e[13~" [f3])
(define-key lk201-function-map "\e[14~" [f4])
(define-key lk201-function-map "\e[15~" [f5])
(define-key lk201-function-map "\e[17~" [f6])
(define-key lk201-function-map "\e[18~" [f7])
(define-key lk201-function-map "\e[19~" [f8])
(define-key lk201-function-map "\e[20~" [f9])
(define-key lk201-function-map "\e[21~" [f10])
;; Customarily F11 is used as the ESC key.
;; The file that includes this one, takes care of that.
(define-key lk201-function-map "\e[23~" [f11])
(define-key lk201-function-map "\e[24~" [f12])
(define-key lk201-function-map "\e[25~" [f13])
(define-key lk201-function-map "\e[26~" [f14])
(define-key lk201-function-map "\e[28~" [help])
(define-key lk201-function-map "\e[29~" [menu])
(define-key lk201-function-map "\e[31~" [f17])
(define-key lk201-function-map "\e[32~" [f18])
(define-key lk201-function-map "\e[33~" [f19])
(define-key lk201-function-map "\e[34~" [f20])
1993-05-30 03:34:09 +00:00
;; Termcap or terminfo should set these.
;; (define-key lk201-function-map "\eOA" [up])
;; (define-key lk201-function-map "\eOB" [down])
;; (define-key lk201-function-map "\eOC" [right])
;; (define-key lk201-function-map "\eOD" [left])
;; Termcap or terminfo should set these, but doesn't properly.
;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c
(define-key lk201-function-map "\eOP" [kp-f1])
(define-key lk201-function-map "\eOQ" [kp-f2])
(define-key lk201-function-map "\eOR" [kp-f3])
(define-key lk201-function-map "\eOS" [kp-f4])
(define-key lk201-function-map "\eOI" [kp-tab])
(define-key lk201-function-map "\eOj" [kp-multiply])
(define-key lk201-function-map "\eOk" [kp-add])
(define-key lk201-function-map "\eOl" [kp-separator])
(define-key lk201-function-map "\eOM" [kp-enter])
(define-key lk201-function-map "\eOm" [kp-subtract])
(define-key lk201-function-map "\eOn" [kp-decimal])
(define-key lk201-function-map "\eOo" [kp-divide])
(define-key lk201-function-map "\eOp" [kp-0])
(define-key lk201-function-map "\eOq" [kp-1])
(define-key lk201-function-map "\eOr" [kp-2])
(define-key lk201-function-map "\eOs" [kp-3])
(define-key lk201-function-map "\eOt" [kp-4])
(define-key lk201-function-map "\eOu" [kp-5])
(define-key lk201-function-map "\eOv" [kp-6])
(define-key lk201-function-map "\eOw" [kp-7])
(define-key lk201-function-map "\eOx" [kp-8])
(define-key lk201-function-map "\eOy" [kp-9]))
(defun terminal-init-lk201 ()
;; The terminal-local stuff only need to be set up on the first
;; frame on that device.
(when (eq 1 (length (frames-on-display-list)))
;; Use inheritance to let the main keymap override these defaults.
;; This way we don't override terminfo-derived settings or settings
;; made in the .emacs file.
(let ((m (copy-keymap lk201-function-map)))
Fix semantics of terminal-local variables. Remove `terminal-local-value' hack. * src/data.c (do_symval_forwarding, store_symval_forwarding) (find_symbol_value): Use the selected frame's keyboard, not current_kboard. * src/data.c (Fterminal_local_value, Fset_terminal_local_value): Disable these functions. * src/data.c (syms_of_data): Don't defsubr them. * lisp/edmacro.el (edmacro-format-keys): Remove terminal-local-value calls. * lisp/emulation/cua-base.el (cua--pre-command-handler-1): Ditto. * lisp/international/encoded-kb.el (encoded-kbd-setup-display): Ditto. * lisp/isearch.el (isearch-other-meta-char): Ditto. * lisp/obsolete/keyswap.el (the-table): Ditto. * lisp/simple.el (normal-erase-is-backspace-mode): Ditto. * lisp/subr.el (keyboard-translate, read-quoted-char): Ditto. * lisp/term/AT386.el (terminal-init-AT386): Ditto. * lisp/term/internal.el: Ditto. * lisp/term/iris-ansi.el (terminal-init-iris-ansi): Ditto. * lisp/term/lk201.el (terminal-init-lk201): Ditto. * lisp/term/mac-win.el: Ditto. * lisp/term/news.el (terminal-init-news): Ditto. * lisp/term/rxvt.el (terminal-init-rxvt): Ditto. * lisp/term/sun.el (terminal-init-sun): Ditto. * lisp/term/tvi970.el (terminal-init-tvi970): Ditto. * lisp/term/vt200.el (terminal-init-vt200): Ditto. * lisp/term/vt201.el (terminal-init-vt201): Ditto. * lisp/term/vt220.el (terminal-init-vt220): Ditto. * lisp/term/vt240.el (terminal-init-vt240): Ditto. * lisp/term/vt300.el (terminal-init-vt300): Ditto. * lisp/term/vt320.el (terminal-init-vt320): Ditto. * lisp/term/vt400.el (terminal-init-vt400): Ditto. * lisp/term/vt420.el (terminal-init-vt420): Ditto. * lisp/term/wyse50.el (terminal-init-wyse50): Ditto. * lisp/term/x-win.el (x-setup-function-keys): Ditto. * lisp/term/xterm.el (terminal-init-xterm): Ditto. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-434
2005-10-29 11:50:12 +00:00
(set-keymap-parent m (keymap-parent local-function-key-map))
(set-keymap-parent local-function-key-map m))))
2003-09-01 15:45:59 +00:00
;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d
;;; lk201.el ends here