Mercurial > emacs
comparison lisp/emulation/edt-mapper.el @ 47940:c6a3d10a0675
(top-level): Fix typo.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 18 Oct 2002 08:59:10 +0000 |
parents | 0f4506820432 |
children | 695cf19ef79e d7ddb3e565de |
comparison
equal
deleted
inserted
replaced
47939:5f47d61ffbdc | 47940:c6a3d10a0675 |
---|---|
89 ;; edt-mapper can do about it. You must press RETURN, to skip the | 89 ;; edt-mapper can do about it. You must press RETURN, to skip the |
90 ;; current key and continue. Later, you and/or your local Emacs guru | 90 ;; current key and continue. Later, you and/or your local Emacs guru |
91 ;; can try to figure out why the key is being ignored. | 91 ;; can try to figure out why the key is being ignored. |
92 | 92 |
93 ;;; History: | 93 ;;; History: |
94 ;; | 94 ;; |
95 | 95 |
96 ;; Version 4.0 2000 Added 2 New Features | 96 ;; Version 4.0 2000 Added 2 New Features |
97 | 97 |
98 ;;; Code: | 98 ;;; Code: |
99 | 99 |
144 (defvar edt-key-seq nil) | 144 (defvar edt-key-seq nil) |
145 (defvar edt-enter-seq nil) | 145 (defvar edt-enter-seq nil) |
146 (defvar edt-return-seq nil) | 146 (defvar edt-return-seq nil) |
147 (defvar edt-term nil) | 147 (defvar edt-term nil) |
148 | 148 |
149 ;;; | 149 ;;; |
150 ;;; Determine Terminal Type (if appropriate). | 150 ;;; Determine Terminal Type (if appropriate). |
151 ;;; | 151 ;;; |
152 | 152 |
153 (if (and edt-window-system (not (eq edt-window-system 'tty))) | 153 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
154 (setq edt-term nil) | 154 (setq edt-term nil) |
155 (setq edt-term (getenv "TERM"))) | 155 (setq edt-term (getenv "TERM"))) |
156 | 156 |
157 ;;; | 157 ;;; |
158 ;;; Make sure the window is big enough to display the instructions, | 158 ;;; Make sure the window is big enough to display the instructions, |
159 ;;; except where window cannot be re-sized. | 159 ;;; except where window cannot be re-sized. |
160 ;;; | 160 ;;; |
161 | 161 |
162 (if (and edt-window-system (not (eq edt-window-system 'tty))) | 162 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
163 (set-frame-size (selected-frame) 80 36)) | 163 (set-frame-size (selected-frame) 80 36)) |
164 | 164 |
165 ;;; | 165 ;;; |
215 keypad keys and function keys so that they can emulate the LK-201 | 215 keypad keys and function keys so that they can emulate the LK-201 |
216 keypad and function keys or the subset of keys found on a VT-100 | 216 keypad and function keys or the subset of keys found on a VT-100 |
217 series terminal keyboard. (The LK-201 keyboard is the standard | 217 series terminal keyboard. (The LK-201 keyboard is the standard |
218 keyboard attached to VT-200 series terminals, and above.) | 218 keyboard attached to VT-200 series terminals, and above.) |
219 | 219 |
220 If you are using an real LK-201 keyboard, you should map the keys | 220 If you are using a real LK-201 keyboard, you should map the keys |
221 exactly as they are on the keyboard. | 221 exactly as they are on the keyboard. |
222 | 222 |
223 Start by pressing the RETURN key, and continue by pressing the keys | 223 Start by pressing the RETURN key, and continue by pressing the keys |
224 specified in the mini-buffer. If you want to entirely omit a key, | 224 specified in the mini-buffer. If you want to entirely omit a key, |
225 because your keyboard does not have a corresponding key, for example, | 225 because your keyboard does not have a corresponding key, for example, |
232 ;;; | 232 ;;; |
233 ;;; Save <CR> for future reference. | 233 ;;; Save <CR> for future reference. |
234 ;;; | 234 ;;; |
235 ;;; For GNU Emacs, running in a Window System, first hide bindings in | 235 ;;; For GNU Emacs, running in a Window System, first hide bindings in |
236 ;;; function-key-map. | 236 ;;; function-key-map. |
237 ;;; | 237 ;;; |
238 (cond | 238 (cond |
239 (edt-x-emacs-p | 239 (edt-x-emacs-p |
240 (setq edt-return-seq (read-key-sequence "Hit carriage-return <CR> to continue ")) | 240 (setq edt-return-seq (read-key-sequence "Hit carriage-return <CR> to continue ")) |
241 (setq edt-return (concat "[" (format "%s" (event-key (aref edt-return-seq 0))) "]"))) | 241 (setq edt-return (concat "[" (format "%s" (event-key (aref edt-return-seq 0))) "]"))) |
242 (t | 242 (t |
250 ;;; Remove prefix-key bindings to F1 and F2 in global-map so they can be | 250 ;;; Remove prefix-key bindings to F1 and F2 in global-map so they can be |
251 ;;; bound in the EDT Emulation mode. | 251 ;;; bound in the EDT Emulation mode. |
252 ;;; | 252 ;;; |
253 (global-unset-key [f1]) | 253 (global-unset-key [f1]) |
254 (global-unset-key [f2]) | 254 (global-unset-key [f2]) |
255 | 255 |
256 ;;; | 256 ;;; |
257 ;;; Display Keypad Diagram and Begin Prompting for Keys | 257 ;;; Display Keypad Diagram and Begin Prompting for Keys |
258 ;;; | 258 ;;; |
259 (set-buffer "Directions") | 259 (set-buffer "Directions") |
260 (delete-region (point-min) (point-max)) | 260 (delete-region (point-min) (point-max)) |
457 ADDITIONAL FUNCTION KEYS | 457 ADDITIONAL FUNCTION KEYS |
458 | 458 |
459 Your keyboard may have additional function keys which do not correspond | 459 Your keyboard may have additional function keys which do not correspond |
460 to any LK-201 keys. The EDT Emulation can be configured to recognize | 460 to any LK-201 keys. The EDT Emulation can be configured to recognize |
461 those keys, since you may wish to add your own key bindings to those keys. | 461 those keys, since you may wish to add your own key bindings to those keys. |
462 | 462 |
463 For example, suppose your keyboard has a keycap marked \"Line Del\" and | 463 For example, suppose your keyboard has a keycap marked \"Line Del\" and |
464 you wish to add it to the list of keys which can be customized by the EDT | 464 you wish to add it to the list of keys which can be customized by the EDT |
465 Emulation. First, assign a unique single-word name to the key for use by | 465 Emulation. First, assign a unique single-word name to the key for use by |
466 the EDT Emulation, for example, \"linedel\". Then, at the \"EDT Key | 466 the EDT Emulation, for example, \"linedel\". Then, at the \"EDT Key |
467 Name:\" prompt, enter \"linedel\", followed by a press of the RETURN key. | 467 Name:\" prompt, enter \"linedel\", followed by a press of the RETURN key. |
482 ;; Extra Keys | 482 ;; Extra Keys |
483 ;; | 483 ;; |
484 ") | 484 ") |
485 ;;; | 485 ;;; |
486 ;;; Restore function-key-map. | 486 ;;; Restore function-key-map. |
487 ;;; | 487 ;;; |
488 (if (and edt-window-system (not edt-x-emacs-p)) | 488 (if (and edt-window-system (not edt-x-emacs-p)) |
489 (setq function-key-map edt-save-function-key-map)) | 489 (setq function-key-map edt-save-function-key-map)) |
490 (setq EDT-key-name "") | 490 (setq EDT-key-name "") |
491 (while (not | 491 (while (not |
492 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) "")) | 492 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) "")) |