Mercurial > emacs
annotate lisp/term/iris-ansi.el @ 88346:3be7f212f8bc
*** empty log message ***
author | Henrik Enberg <henrik.enberg@telia.com> |
---|---|
date | Fri, 27 Apr 2007 21:33:38 +0000 |
parents | d7ddb3e565de |
children |
rev | line source |
---|---|
47726
33d53d287ee4
Add "no-byte-compile: t" in first line.
Juanma Barranquero <lekktu@gmail.com>
parents:
38436
diff
changeset
|
1 ;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*- |
23367 | 2 |
88155 | 3 ;; Copyright (C) 1997, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
23367 | 4 |
5 ;; Author: Dan Nicolaescu <dann@ics.uci.edu> | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
88155 | 21 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 ;; Boston, MA 02110-1301, USA. | |
23367 | 23 |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
23367
diff
changeset
|
24 ;;; Commentary: |
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
23367
diff
changeset
|
25 |
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
23367
diff
changeset
|
26 ;;; Code: |
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
23367
diff
changeset
|
27 |
88155 | 28 (defun iris-ansi-initialize-terminal () |
29 "Terminal initialization function for iris-ansi." | |
30 (define-key function-key-map "\e[120q" [S-escape]) | |
31 (define-key function-key-map "\e[121q" [C-escape]) | |
23367 | 32 |
88155 | 33 (define-key function-key-map "\e[001q" [f1]) |
34 (define-key function-key-map "\e[013q" [S-f1]) | |
35 (define-key function-key-map "\e[025q" [C-f1]) | |
23367 | 36 |
37 | |
88155 | 38 (define-key function-key-map "\e[002q" [f2]) |
39 (define-key function-key-map "\e[014q" [S-f2]) | |
40 (define-key function-key-map "\e[026q" [C-f2]) | |
41 (define-key function-key-map "\e[038q" [M-f2]) | |
42 | |
43 (define-key function-key-map "\e[003q" [f3]) | |
44 (define-key function-key-map "\e[015q" [S-f3]) | |
45 (define-key function-key-map "\e[027q" [C-f3]) | |
23367 | 46 |
47 | |
88155 | 48 (define-key function-key-map "\e[004q" [f4]) |
49 (define-key function-key-map "\e[016q" [S-f4]) | |
50 (define-key function-key-map "\e[028q" [C-f4]) | |
23367 | 51 |
52 | |
88155 | 53 (define-key function-key-map "\e[005q" [f5]) |
54 (define-key function-key-map "\e[017q" [S-f5]) | |
55 (define-key function-key-map "\e[029q" [C-f5]) | |
23367 | 56 |
57 | |
88155 | 58 (define-key function-key-map "\e[006q" [f6]) |
59 (define-key function-key-map "\e[018q" [S-f6]) | |
60 (define-key function-key-map "\e[030q" [C-f6]) | |
61 | |
62 | |
63 (define-key function-key-map "\e[007q" [f7]) | |
64 (define-key function-key-map "\e[019q" [S-f7]) | |
65 (define-key function-key-map "\e[031q" [C-f7]) | |
23367 | 66 |
67 | |
88155 | 68 (define-key function-key-map "\e[008q" [f8]) |
69 (define-key function-key-map "\e[020q" [S-f8]) | |
70 (define-key function-key-map "\e[032q" [C-f8]) | |
23367 | 71 |
72 | |
88155 | 73 (define-key function-key-map "\e[009q" [f9]) |
74 (define-key function-key-map "\e[021q" [S-f9]) | |
75 (define-key function-key-map "\e[033q" [C-f9]) | |
23367 | 76 |
77 | |
88155 | 78 (define-key function-key-map "\e[010q" [f10]) |
79 (define-key function-key-map "\e[022q" [S-f10]) | |
80 (define-key function-key-map "\e[034q" [C-f10]) | |
23367 | 81 |
82 | |
88155 | 83 (define-key function-key-map "\e[011q" [f11]) |
84 (define-key function-key-map "\e[023q" [S-f11]) | |
85 (define-key function-key-map "\e[035q" [C-f11]) | |
86 (define-key function-key-map "\e[047q" [M-f11]) | |
23367 | 87 |
88155 | 88 (define-key function-key-map "\e[012q" [f12]) |
89 (define-key function-key-map "\e[024q" [S-f12]) | |
90 (define-key function-key-map "\e[036q" [C-f12]) | |
91 (define-key function-key-map "\e[048q" [M-f12]) | |
23367 | 92 |
93 | |
88155 | 94 (define-key function-key-map "\e[057q" [?\C-`]) |
95 (define-key function-key-map "\e[115q" [?\M-`]) | |
23367 | 96 |
88155 | 97 (define-key function-key-map "\e[049q" [?\C-1]) |
98 (define-key function-key-map "\e[058q" [?\M-1]) | |
23367 | 99 |
100 | |
88155 | 101 (define-key function-key-map "\e[059q" [?\M-2]) |
23367 | 102 |
88155 | 103 (define-key function-key-map "\e[050q" [?\C-3]) |
104 (define-key function-key-map "\e[060q" [?\M-3]) | |
23367 | 105 |
88155 | 106 (define-key function-key-map "\e[051q" [?\C-4]) |
107 (define-key function-key-map "\e[061q" [?\M-4]) | |
23367 | 108 |
88155 | 109 (define-key function-key-map "\e[052q" [?\C-5]) |
110 (define-key function-key-map "\e[062q" [?\M-5]) | |
23367 | 111 |
112 | |
88155 | 113 (define-key function-key-map "\e[063q" [?\M-6]) |
23367 | 114 |
88155 | 115 (define-key function-key-map "\e[053q" [?\C-7]) |
116 (define-key function-key-map "\e[064q" [?\M-7]) | |
23367 | 117 |
88155 | 118 (define-key function-key-map "\e[054q" [?\C-8]) |
119 (define-key function-key-map "\e[065q" [?\M-8]) | |
23367 | 120 |
88155 | 121 (define-key function-key-map "\e[055q" [?\C-9]) |
122 (define-key function-key-map "\e[066q" [?\M-9]) | |
23367 | 123 |
88155 | 124 (define-key function-key-map "\e[056q" [?\C-0]) |
125 (define-key function-key-map "\e[067q" [?\M-0]) | |
23367 | 126 |
88155 | 127 (define-key function-key-map "\e[068q" [?\M--]) |
23367 | 128 |
88155 | 129 (define-key function-key-map "\e[069q" [?\C-=]) |
130 (define-key function-key-map "\e[070q" [?\M-=]) | |
23367 | 131 |
88155 | 132 ;; I don't know what to do with those. |
133 ;;(define-key function-key-map "^H" [<del>]) | |
134 ;;(define-key function-key-map "^H" [S-<del>]) | |
135 ;;(define-key function-key-map "\177" [C-<del>]) | |
136 ;;(define-key function-key-map "\e[071q" [M-<del>]) | |
23367 | 137 |
88155 | 138 (define-key function-key-map "\e[Z" [?\S-\t]) |
139 (define-key function-key-map "\e[072q" [?\C-\t]) | |
140 ;; This only works if you remove the M-TAB keybing from the system.4Dwmrc | |
141 ;; our your ~/.4Dwmrc, if you use the 4Dwm window manager. | |
142 (define-key function-key-map "\e[073q" [?\M-\t]) | |
23367 | 143 |
88155 | 144 (define-key function-key-map "\e[074q" [?\M-q]) |
23367 | 145 |
88155 | 146 (define-key function-key-map "\e[075q" [?\M-w]) |
23367 | 147 |
88155 | 148 (define-key function-key-map "\e[076q" [?\M-e]) |
23367 | 149 |
88155 | 150 (define-key function-key-map "\e[077q" [?\M-r]) |
23367 | 151 |
88155 | 152 (define-key function-key-map "\e[078q" [?\M-t]) |
23367 | 153 |
88155 | 154 (define-key function-key-map "\e[079q" [?\M-y]) |
23367 | 155 |
88155 | 156 (define-key function-key-map "\e[080q" [?\M-u]) |
23367 | 157 |
88155 | 158 (define-key function-key-map "\e[081q" [?\M-i]) |
23367 | 159 |
88155 | 160 (define-key function-key-map "\e[082q" [?\M-o]) |
23367 | 161 |
88155 | 162 (define-key function-key-map "\e[083q" [?\M-p]) |
23367 | 163 |
88155 | 164 (define-key function-key-map "\e[084q" [?\M-\[]) |
23367 | 165 |
88155 | 166 (define-key function-key-map "\e[085q" [?\M-\]]) |
23367 | 167 |
88155 | 168 (define-key function-key-map "\e[086q" [?\M-\\]) |
23367 | 169 |
88155 | 170 (define-key function-key-map "\e[087q" [?\M-a]) |
23367 | 171 |
88155 | 172 (define-key function-key-map "\e[088q" [?\M-s]) |
23367 | 173 |
88155 | 174 (define-key function-key-map "\e[089q" [?\M-d]) |
23367 | 175 |
88155 | 176 (define-key function-key-map "\e[090q" [?\M-f]) |
23367 | 177 |
88155 | 178 (define-key function-key-map "\e[091q" [?\M-g]) |
23367 | 179 |
88155 | 180 (define-key function-key-map "\e[092q" [?\M-h]) |
23367 | 181 |
88155 | 182 (define-key function-key-map "\e[093q" [?\M-j]) |
23367 | 183 |
88155 | 184 (define-key function-key-map "\e[094q" [?\M-k]) |
23367 | 185 |
88155 | 186 (define-key function-key-map "\e[095q" [?\M-l]) |
23367 | 187 |
88155 | 188 (define-key function-key-map "\e[096q" [?\C-\;]) |
189 (define-key function-key-map "\e[097q" [?\M-:]) ;; we are cheating | |
190 ;; here, this is | |
191 ;; realy M-;, but | |
192 ;; M-: generates the | |
193 ;; same string and | |
194 ;; is more usefull. | |
23367 | 195 |
88155 | 196 (define-key function-key-map "\e[098q" [?\C-']) |
197 (define-key function-key-map "\e[099q" [?\M-']) | |
23367 | 198 |
88155 | 199 (define-key function-key-map "\e[100q" [?\M-\n]) |
23367 | 200 |
88155 | 201 (define-key function-key-map "\e[101q" [?\M-z]) |
23367 | 202 |
88155 | 203 (define-key function-key-map "\e[102q" [?\M-x]) |
23367 | 204 |
88155 | 205 (define-key function-key-map "\e[103q" [?\M-c]) |
23367 | 206 |
88155 | 207 (define-key function-key-map "\e[104q" [?\M-v]) |
23367 | 208 |
88155 | 209 (define-key function-key-map "\e[105q" [?\M-b]) |
23367 | 210 |
88155 | 211 (define-key function-key-map "\e[106q" [M-n]) |
23367 | 212 |
88155 | 213 (define-key function-key-map "\e[107q" [M-m]) |
23367 | 214 |
88155 | 215 (define-key function-key-map "\e[108q" [?\C-,]) |
216 (define-key function-key-map "\e[109q" [?\M-,]) | |
23367 | 217 |
88155 | 218 (define-key function-key-map "\e[110q" [?\C-.]) |
219 (define-key function-key-map "\e[111q" [?\M-.]) | |
23367 | 220 |
88155 | 221 (define-key function-key-map "\e[112q" [?\C-/]) |
222 (define-key function-key-map "\e[113q" [?\M-/]) | |
23367 | 223 |
88155 | 224 (define-key function-key-map "\e[139q" [insert]) |
225 (define-key function-key-map "\e[139q" [S-insert]) | |
226 (define-key function-key-map "\e[140q" [C-insert]) | |
227 (define-key function-key-map "\e[141q" [M-insert]) | |
23367 | 228 |
88155 | 229 (define-key function-key-map "\e[H" [home]) |
230 (define-key function-key-map "\e[143q" [S-home]) | |
231 (define-key function-key-map "\e[144q" [C-home]) | |
23367 | 232 |
233 | |
88155 | 234 (define-key function-key-map "\e[150q" [prior]) |
235 (define-key function-key-map "\e[151q" [S-prior]) ;; those don't | |
236 ;; seem to | |
237 ;; generate | |
238 ;; anything | |
239 (define-key function-key-map "\e[152q" [C-prior]) | |
23367 | 240 |
241 | |
88155 | 242 ;; (define-key function-key-map "^?" [delete]) |
243 (define-key function-key-map "\e[P" [S-delete]) | |
244 (define-key function-key-map "\e[142q" [C-delete]) | |
245 (define-key function-key-map "\e[M" [M-delete]) | |
23367 | 246 |
88155 | 247 (define-key function-key-map "\e[146q" [end]) |
248 (define-key function-key-map "\e[147q" [S-end]) ;; those don't seem | |
249 ;; to generate | |
250 ;; anything | |
251 (define-key function-key-map "\e[148q" [C-end]) | |
23367 | 252 |
88155 | 253 (define-key function-key-map "\e[154q" [next]) |
254 (define-key function-key-map "\e[155q" [S-next]) | |
255 (define-key function-key-map "\e[156q" [C-next]) | |
23367 | 256 |
257 | |
88155 | 258 (define-key function-key-map "\e[161q" [S-up]) |
259 (define-key function-key-map "\e[162q" [C-up]) | |
260 (define-key function-key-map "\e[163q" [M-up]) | |
23367 | 261 |
88155 | 262 (define-key function-key-map "\e[158q" [S-left]) |
263 (define-key function-key-map "\e[159q" [C-left]) | |
264 (define-key function-key-map "\e[160q" [M-left]) | |
23367 | 265 |
88155 | 266 (define-key function-key-map "\e[164q" [S-down]) |
267 (define-key function-key-map "\e[165q" [C-down]) | |
268 (define-key function-key-map "\e[166q" [M-down]) | |
23367 | 269 |
88155 | 270 (define-key function-key-map "\e[167q" [S-right]) |
271 (define-key function-key-map "\e[168q" [C-right]) | |
272 (define-key function-key-map "\e[169q" [M-right]) | |
23367 | 273 |
88155 | 274 ;; Keypad functions, most of those are untested. |
275 (define-key function-key-map "\e[179q" [?\C-/]) | |
276 (define-key function-key-map "\e[180q" [?\M-/]) | |
23367 | 277 |
88155 | 278 (define-key function-key-map "\e[187q" [?\C-*]) |
279 (define-key function-key-map "\e[188q" [?\M-*]) | |
23367 | 280 |
88155 | 281 (define-key function-key-map "\e[198q" [?\C--]) |
282 (define-key function-key-map "\e[199q" [?\M--]) | |
23367 | 283 |
88155 | 284 ;; Something else takes care of home, up, prior, down, left, right, next |
285 ;;(define-key function-key-map "\e[H" [home]) | |
286 (define-key function-key-map "\e[172q" [C-home]) | |
23367 | 287 |
88155 | 288 ;;(define-key function-key-map "\e[A" [up]) |
289 (define-key function-key-map "\e[182q" [C-up]) | |
23367 | 290 |
291 | |
88155 | 292 ;;(define-key function-key-map "\e[150q" [prior]) |
293 (define-key function-key-map "\e[190q" [C-prior]) | |
23367 | 294 |
295 | |
88155 | 296 (define-key function-key-map "\e[200q" [?\C-+]) |
297 (define-key function-key-map "\e[201q" [?\M-+]) | |
23367 | 298 |
88155 | 299 ;;(define-key function-key-map "\e[D" [left]) |
300 (define-key function-key-map "\e[174q" [C-left]) | |
23367 | 301 |
302 | |
88155 | 303 (define-key function-key-map "\e[000q" [begin]) |
304 (define-key function-key-map "\e[184q" [C-begin]) | |
23367 | 305 |
306 | |
88155 | 307 ;;(define-key function-key-map "\e[C" [right]) |
308 (define-key function-key-map "\e[192q" [C-right]) | |
23367 | 309 |
88155 | 310 ;;(define-key function-key-map "\e[146q" [end]) |
311 (define-key function-key-map "\e[176q" [C-end]) | |
23367 | 312 |
88155 | 313 ;;(define-key function-key-map "\e[B" [down]) |
314 (define-key function-key-map "\e[186q" [C-down]) | |
23367 | 315 |
88155 | 316 ;;(define-key function-key-map "\e[154q" [next]) |
317 (define-key function-key-map "\e[194q" [C-next]) | |
23367 | 318 |
319 | |
88155 | 320 (define-key function-key-map "\e[100q" [M-enter]) |
23367 | 321 |
88155 | 322 (define-key function-key-map "\e[139q" [insert]) |
323 (define-key function-key-map "\e[178q" [C-inset]) | |
23367 | 324 |
88155 | 325 (define-key function-key-map "\e[P" [delete]) |
326 (define-key function-key-map "\e[196q" [C-delete]) | |
327 (define-key function-key-map "\e[197q" [M-delete])) | |
23367 | 328 |
88155 | 329 ;;; arch-tag: b1d0e73a-bb7d-47be-9fb2-6fb126469a1b |
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
23367
diff
changeset
|
330 ;;; iris-ansi.el ends here |