1 ;;; xterm.el --- define function key sequences for xterm
6 ;; Copyright (C) 1995 Free Software Foundation, Inc.
8 ;; This file is part of XEmacs.
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
26 ;; Termcap or terminfo should set these next four?
27 (define-key function-key-map "\e[A" [up])
28 (define-key function-key-map "\e[B" [down])
29 (define-key function-key-map "\e[C" [right])
30 (define-key function-key-map "\e[D" [left])
32 (define-key function-key-map "\eO\000" [home])
33 (define-key function-key-map "\eOe" [end])
34 (define-key function-key-map "\e[1~" [find])
35 (define-key function-key-map "\e[2~" [insert])
36 (define-key function-key-map "\e[3~" [delete])
37 (define-key function-key-map "\e[4~" [select])
38 (define-key function-key-map "\e[5~" [prior])
39 (define-key function-key-map "\e[6~" [next])
40 (define-key function-key-map "\e[11~" [f1])
41 (define-key function-key-map "\e[12~" [f2])
42 (define-key function-key-map "\e[13~" [f3])
43 (define-key function-key-map "\e[14~" [f4])
44 (define-key function-key-map "\e[15~" [f5])
45 (define-key function-key-map "\e[17~" [f6])
46 (define-key function-key-map "\e[18~" [f7])
47 (define-key function-key-map "\e[19~" [f8])
48 (define-key function-key-map "\e[20~" [f9])
49 (define-key function-key-map "\e[21~" [f10])
50 (define-key function-key-map "\e[23~" [f11])
51 (define-key function-key-map "\e[24~" [f12])
52 (define-key function-key-map "\e[25~" [f13])
53 (define-key function-key-map "\e[26~" [f14])
54 (define-key function-key-map "\e[28~" [help])
55 (define-key function-key-map "\e[29~" [menu])
56 ; FSF's xterm.el defines this like this:
57 ; (I don't know which one is more correct)
58 ;(define-key function-key-map "\e[29~" [print])
59 (define-key function-key-map "\e[31~" [f17])
60 (define-key function-key-map "\e[32~" [f18])
61 (define-key function-key-map "\e[33~" [f19])
62 (define-key function-key-map "\e[34~" [f20])
64 ;; Termcap or terminfo should set these next four.
65 (define-key function-key-map "\eOA" [up])
66 (define-key function-key-map "\eOB" [down])
67 (define-key function-key-map "\eOC" [right])
68 (define-key function-key-map "\eOD" [left])
70 (define-key function-key-map "\eOp" [kp-0])
71 (define-key function-key-map "\eOq" [kp-1])
72 (define-key function-key-map "\eOr" [kp-2])
73 (define-key function-key-map "\eOs" [kp-3])
74 (define-key function-key-map "\eOt" [kp-4])
75 (define-key function-key-map "\eOu" [kp-5])
76 (define-key function-key-map "\eOv" [kp-6])
77 (define-key function-key-map "\eOw" [kp-7])
78 (define-key function-key-map "\eOx" [kp-8])
79 (define-key function-key-map "\eOy" [kp-9])
81 (define-key function-key-map "\eOk" [kp-add])
82 (define-key function-key-map "\eOm" [kp-subtract])
83 (define-key function-key-map "\eOM" [kp-enter])
84 (define-key function-key-map "\eOj" [kp-multiply])
85 (define-key function-key-map "\eOo" [kp-divide])
86 (define-key function-key-map "\eOn" [kp-decimal])
88 ;; If you use the X resource -- XTerm*sunFunctionKeys: on -- you may
90 (define-key function-key-map "\e[224z" [f1])
91 (define-key function-key-map "\e[225z" [f2])
92 (define-key function-key-map "\e[226z" [f3])
93 (define-key function-key-map "\e[227z" [f4])
94 (define-key function-key-map "\e[228z" [f5])
95 (define-key function-key-map "\e[229z" [f6])
96 (define-key function-key-map "\e[230z" [f7])
97 (define-key function-key-map "\e[231z" [f8])
98 (define-key function-key-map "\e[232z" [f9])
99 (define-key function-key-map "\e[233z" [f10])
100 (define-key function-key-map "\e[234z" [f11])
101 (define-key function-key-map "\e[235z" [f12])
102 (define-key function-key-map "\e[194z" [(shift f1)])
103 (define-key function-key-map "\e[195z" [(shift f2)])
104 (define-key function-key-map "\e[196z" [(shift f3)])
105 (define-key function-key-map "\e[197z" [(shift f4)])
106 (define-key function-key-map "\e[198z" [(shift f5)])
107 (define-key function-key-map "\e[199z" [(shift f6)])
108 (define-key function-key-map "\e[200z" [(shift f7)])
109 (define-key function-key-map "\e[201z" [(shift f8)])
110 (define-key function-key-map "\e[208z" [(shift f9)])
111 (define-key function-key-map "\e[209z" [(shift f10)])
112 (define-key function-key-map "\e[210z" [(shift f11)])
113 (define-key function-key-map "\e[211z" [(shift f12)])
114 (define-key function-key-map "\e[2z" [insert])
115 (define-key function-key-map "\e[5z" [prior])
116 (define-key function-key-map "\e[6z" [next])
118 ;;; xterm.el ends here