Mercurial > emacs
annotate lisp/term/tvi970.el @ 20892:18f3cb26243f before-miles-orphaned-changes gcc-2_8_1-980401 gcc-2_8_1-980407 gcc-2_8_1-980412 gcc-2_8_1-980413 gcc-2_8_1-RELEASE gcc_2_8_1-980315 libc-980214 libc-980215 libc-980216 libc-980217 libc-980218 libc-980219 libc-980220 libc-980221 libc-980222 libc-980223 libc-980224 libc-980225 libc-980226 libc-980227 libc-980228 libc-980301 libc-980302 libc-980303 libc-980304 libc-980306 libc-980307 libc-980308 libc-980309 libc-980310 libc-980311 libc-980312 libc-980313 libc-980314 libc-980315 libc-980316 libc-980317 libc-980318 libc-980319 libc-980320 libc-980321 libc-980322 libc-980323 libc-980324 libc-980325 libc-980326 libc-980327 libc-980328 libc-980329 libc-980330 libc-980331 libc-980401 libc-980402 libc-980403 libc-980404 libc-980405 libc-980406 libc-980407 libc-980408 libc-980409 libc-980410 libc-980411 libc-980412 libc-980413 libc-980414 libc-980428 libc-980429 libc-980430 libc-980501 libc-980502 libc-980503 libc-980504 libc-980505 libc-980506 libc-980507 libc-980508 libc-980509 libc-980510 libc-980512 libc-980513 libc-980514 libc-980515 libc-980516 libc-980517 libc-980518 libc-980519 libc-980520 libc-980521 libc-980522 libc-980523 libc-980524 libc-980525 libc-980526 libc-980527 libc-980528 libc-980529 libc-980530 libc-980531 libc-980601 libc-980602 libc-980603 libc-980604 libc-980605 libc-980606 libc-980607 libc-980608 libc-980609 libc-980610 libc-980611 libc-980612 libc-980613
Add PentiumII (i786). Add '7' to all i[3456] entries.
Add AMD and Cyrix names for P5 and P6.
author | Richard Kenner <kenner@gnu.org> |
---|---|
date | Fri, 13 Feb 1998 12:16:46 +0000 |
parents | 23cc3f54e536 |
children | b174db545cfd |
rev | line source |
---|---|
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
1 ;;; tvi970.el --- terminal support for the Televideo 970 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
2 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
3 ;; Author: Jim Blandy <jimb@occs.cs.oberlin.edu>, January 1992 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
4 ;; Keywords: terminals |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
5 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
6 ;; Copyright (C) 1992 Free Software Foundation, Inc. |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
7 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
8 ;; This file is part of GNU Emacs. |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
9 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
11 ;; it under the terms of the GNU General Public License as published by |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
12 ;; the Free Software Foundation; either version 2, or (at your option) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
13 ;; any later version. |
530 | 14 |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
15 ;; GNU Emacs is distributed in the hope that it will be useful, |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
18 ;; GNU General Public License for more details. |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
19 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
20 ;; You should have received a copy of the GNU General Public License |
14170 | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
24 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
25 ;;; Commentary: |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
26 |
14170 | 27 ;; Uses the Emacs 19 terminal initialization features --- won't work with 18. |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
28 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
29 ;;; Code: |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
30 |
530 | 31 (or (lookup-key function-key-map "\e[") |
32 (define-key function-key-map "\e[" (make-keymap))) | |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
33 ;; (or (lookup-key function-key-map "\eO") |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
34 ;; (define-key function-key-map "\eO" (make-keymap))) |
530 | 35 |
36 ;; Miscellaneous keys | |
37 (mapcar (function (lambda (key-binding) | |
38 (define-key function-key-map | |
39 (car key-binding) (nth 1 key-binding)))) | |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
40 '( |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
41 ;; These are set up by termcap or terminfo |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
42 ;; ("\eOP" [kp-f1]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
43 ;; ("\eOQ" [kp-f2]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
44 ;; ("\eOR" [kp-f3]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
45 ;; ("\eOS" [kp-f4]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
46 |
2241
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
47 ;; These might br set by terminfo |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
48 ("\e[H" [home]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
49 ("\e[Z" [backtab]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
50 ("\e[i" [print]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
51 ("\e[@" [insert]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
52 ("\e[L" [insertline]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
53 ("\e[M" [deleteline]) |
2241
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
54 ("\e[U" [next]) ;; actually the `page' key |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
55 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
56 ;; These won't be set up by either |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
57 ("\eOm" [kp-subtract]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
58 ("\eOl" [kp-separator]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
59 ("\eOn" [kp-decimal]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
60 ("\eOM" [kp-enter]) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
61 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
62 ;; These won't be set up by either either |
2241
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
63 ("\e[K" [key_eol]) ;; Not an X keysym |
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
64 ("\e[J" [key_eos]) ;; Not an X keysym |
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
65 ("\e[2J" [key_clear]) ;; Not an X keysym |
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
66 ("\e[P" [key_dc]) ;; Not an X keysym |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
67 ("\e[g" [S-tab]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
68 ("\e[2N" [clearentry]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
69 ("\e[2K" [S-clearentry]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
70 ("\e[E" [?\C-j]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
71 ("\e[g" [S-backtab]) ;; Not an X keysym |
2241
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
72 ("\e[?1i" [key_sprint]) ;; Not an X keysym |
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
73 ("\e[4h" [key_sic]) ;; Not an X keysym |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
74 ("\e[4l" [S-delete]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
75 ("\e[Q" [S-insertline]) ;; Not an X keysym |
2241
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
76 ("\e[1Q" [key_sdl]) ;; Not an X keysym |
f1324e61f9fd
As many key cookies as possible renamed to fit the new conventions
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
2141
diff
changeset
|
77 ("\e[19l" [key_seol]) ;; Not an X keysym |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
78 ("\e[19h" [S-erasepage]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
79 ("\e[V" [S-page]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
80 ("\eS" [send]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
81 ("\e5" [S-send]) ;; Not an X keysym |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
82 )) |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
83 |
530 | 84 ;; The numeric keypad keys. |
85 (let ((i 0)) | |
86 (while (< i 10) | |
87 (define-key function-key-map | |
88 (format "\eO%c" (+ i ?p)) | |
89 (vector (intern (format "kp-%d" i)))) | |
90 (setq i (1+ i)))) | |
91 ;; The numbered function keys. | |
92 (let ((i 0)) | |
93 (while (< i 16) | |
94 (define-key function-key-map | |
95 (format "\e?%c" (+ i ?a)) | |
96 (vector (intern (format "f%d" (1+ i))))) | |
97 (define-key function-key-map | |
98 (format "\e?%c" (+ i ?A)) | |
99 (vector (intern (format "S-f%d" (1+ i))))) | |
100 (setq i (1+ i)))) | |
101 | |
102 | |
103 ;;; Should keypad numbers send ordinary digits or distinct escape sequences? | |
104 (defvar tvi970-keypad-numeric nil | |
105 "The terminal should be in numeric keypad mode iff this variable is non-nil. | |
106 Do not set this variable! Call the function ``tvi970-set-keypad-mode''.") | |
107 | |
108 (defun tvi970-set-keypad-mode (&optional arg) | |
109 "Set the current mode of the TVI 970 numeric keypad. | |
110 In ``numeric keypad mode'', the number keys on the keypad act as | |
111 ordinary digits. In ``alternate keypad mode'', the keys send distinct | |
112 escape sequences, meaning that they can have their own bindings, | |
113 independent of the normal number keys. | |
114 With no argument, toggle between the two possible modes. | |
115 With a positive argument, select alternate keypad mode. | |
116 With a negative argument, select numeric keypad mode." | |
117 (interactive "P") | |
118 (setq tvi970-keypad-numeric | |
119 (if (null arg) | |
120 (not tvi970-keypad-numeric) | |
121 (> (prefix-numeric-value arg) 0))) | |
122 (send-string-to-terminal (if tvi970-keypad-numeric "\e=" "\e>"))) | |
123 | |
124 (tvi970-set-keypad-mode 1) | |
2141
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
125 |
9bc89a98c002
Added headers, changes some keycap names.
Eric S. Raymond <esr@snark.thyrsus.com>
parents:
530
diff
changeset
|
126 ;;; tv970 ends here |