Close bug#5755.
[emacs.git] / lisp / term / lk201.el
blob7bcbd8d754cd963ef1ff31e79c522d15f63f7999
1 ;; -*- no-byte-compile: t -*-
2 ;; Define function key sequences for DEC terminals.
4 (defvar lk201-function-map (make-sparse-keymap)
5 "Function key definitions for DEC terminals.")
7 ;; Termcap or terminfo should set these.
8 ;; (define-key lk201-function-map "\e[A" [up])
9 ;; (define-key lk201-function-map "\e[B" [down])
10 ;; (define-key lk201-function-map "\e[C" [right])
11 ;; (define-key lk201-function-map "\e[D" [left])
13 (define-key lk201-function-map "\e[1~" [find])
14 (define-key lk201-function-map "\e[2~" [insert])
15 (define-key lk201-function-map "\e[3~" [delete])
16 (define-key lk201-function-map "\e[4~" [select])
17 (define-key lk201-function-map "\e[5~" [prior])
18 (define-key lk201-function-map "\e[6~" [next])
19 (define-key lk201-function-map "\e[11~" [f1])
20 (define-key lk201-function-map "\e[12~" [f2])
21 (define-key lk201-function-map "\e[13~" [f3])
22 (define-key lk201-function-map "\e[14~" [f4])
23 (define-key lk201-function-map "\e[15~" [f5])
24 (define-key lk201-function-map "\e[17~" [f6])
25 (define-key lk201-function-map "\e[18~" [f7])
26 (define-key lk201-function-map "\e[19~" [f8])
27 (define-key lk201-function-map "\e[20~" [f9])
28 (define-key lk201-function-map "\e[21~" [f10])
29 ;; Customarily F11 is used as the ESC key.
30 ;; The file that includes this one, takes care of that.
31 (define-key lk201-function-map "\e[23~" [f11])
32 (define-key lk201-function-map "\e[24~" [f12])
33 (define-key lk201-function-map "\e[25~" [f13])
34 (define-key lk201-function-map "\e[26~" [f14])
35 (define-key lk201-function-map "\e[28~" [help])
36 (define-key lk201-function-map "\e[29~" [menu])
37 (define-key lk201-function-map "\e[31~" [f17])
38 (define-key lk201-function-map "\e[32~" [f18])
39 (define-key lk201-function-map "\e[33~" [f19])
40 (define-key lk201-function-map "\e[34~" [f20])
42 ;; Termcap or terminfo should set these.
43 ;; (define-key lk201-function-map "\eOA" [up])
44 ;; (define-key lk201-function-map "\eOB" [down])
45 ;; (define-key lk201-function-map "\eOC" [right])
46 ;; (define-key lk201-function-map "\eOD" [left])
48 ;; Termcap or terminfo should set these, but doesn't properly.
49 ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c
50 (define-key lk201-function-map "\eOP" [kp-f1])
51 (define-key lk201-function-map "\eOQ" [kp-f2])
52 (define-key lk201-function-map "\eOR" [kp-f3])
53 (define-key lk201-function-map "\eOS" [kp-f4])
55 (define-key lk201-function-map "\eOI" [kp-tab])
56 (define-key lk201-function-map "\eOj" [kp-multiply])
57 (define-key lk201-function-map "\eOk" [kp-add])
58 (define-key lk201-function-map "\eOl" [kp-separator])
59 (define-key lk201-function-map "\eOM" [kp-enter])
60 (define-key lk201-function-map "\eOm" [kp-subtract])
61 (define-key lk201-function-map "\eOn" [kp-decimal])
62 (define-key lk201-function-map "\eOo" [kp-divide])
63 (define-key lk201-function-map "\eOp" [kp-0])
64 (define-key lk201-function-map "\eOq" [kp-1])
65 (define-key lk201-function-map "\eOr" [kp-2])
66 (define-key lk201-function-map "\eOs" [kp-3])
67 (define-key lk201-function-map "\eOt" [kp-4])
68 (define-key lk201-function-map "\eOu" [kp-5])
69 (define-key lk201-function-map "\eOv" [kp-6])
70 (define-key lk201-function-map "\eOw" [kp-7])
71 (define-key lk201-function-map "\eOx" [kp-8])
72 (define-key lk201-function-map "\eOy" [kp-9])
74 (defun terminal-init-lk201 ()
75 ;; Use inheritance to let the main keymap override these defaults.
76 ;; This way we don't override terminfo-derived settings or settings
77 ;; made in the .emacs file.
78 (let ((m (copy-keymap lk201-function-map)))
79 (set-keymap-parent m (keymap-parent input-decode-map))
80 (set-keymap-parent input-decode-map m)))
82 ;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d
83 ;;; lk201.el ends here