Mercurial > emacs
annotate lisp/emulation/edt-mapper.el @ 111686:e8049570c647
* lisp/eshell/: Use with-silent-modifications.
* lisp/eshell/esh-cmd.el (eshell-parse-command):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/em-script.el (eshell-source-file):
Use with-silent-modifications.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 23 Nov 2010 12:36:15 -0500 |
parents | 280c8ae2476d |
children | 40af77a50adc |
rev | line source |
---|---|
38436
b174db545cfd
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
35123
diff
changeset
|
1 ;;; edt-mapper.el --- create an EDT LK-201 map file for X-Windows Emacs |
10690 | 2 |
95631
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
3 ;; Copyright (C) 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
106815 | 4 ;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
10690 | 5 |
74641
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
6 ;; Author: Kevin Gallagher <Kevin.Gallagher@boeing.com> |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
7 ;; Maintainer: Kevin Gallagher <Kevin.Gallagher@boeing.com> |
10690 | 8 ;; Keywords: emulations |
110015
280c8ae2476d
Add "Package:" file headers to denote built-in packages.
Chong Yidong <cyd@stupidchicken.com>
parents:
106815
diff
changeset
|
9 ;; Package: edt |
10690 | 10 |
10691 | 11 ;; This file is part of GNU Emacs. |
10690 | 12 |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
13 ;; GNU Emacs is free software: you can redistribute it and/or modify |
10690 | 14 ;; it under the terms of the GNU General Public License as published by |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
15 ;; the Free Software Foundation, either version 3 of the License, or |
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
16 ;; (at your option) any later version. |
10690 | 17 |
18 ;; GNU Emacs is distributed in the hope that it will be useful, | |
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 ;; GNU General Public License for more details. | |
22 | |
23 ;; You should have received a copy of the GNU General Public License | |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
10690 | 25 |
26 ;;; Commentary: | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
27 ;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
28 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
29 ;; [Part of the GNU Emacs EDT Emulation.] |
10690 | 30 |
31 ;; This emacs lisp program can be used to create an emacs lisp file | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
32 ;; that defines the mapping of the user's keyboard to the LK-201 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
33 ;; keyboard function keys and keypad keys (around which EDT has been |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
34 ;; designed). Please read the "Usage" AND "Known Problems" sections |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
35 ;; below before attempting to run this program. (The design of this |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
36 ;; file, edt-mapper.el, was heavily influenced by tpu-mapper.el.) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
37 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
38 ;; Version 4.0 contains the following enhancements: |
10690 | 39 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
40 ;; 1. If you access a workstation using an X Server, note that the |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
41 ;; initialization file generated by edt-mapper.el will now |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
42 ;; contain the name of the X Server vendor. This is a |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
43 ;; convenience for those who have access to their Unix account |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
44 ;; from more than one type of X Server. Since different X |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
45 ;; Servers typically require different EDT emulation |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
46 ;; initialization files, edt-mapper.el will now generate these |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
47 ;; different initialization files and save them with different |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
48 ;; names. |
10690 | 49 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
50 ;; 2. Also, edt-mapper.el is now capable of binding an ASCII key |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
51 ;; sequence, providing the ASCII key sequence prefix is already |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
52 ;; known by Emacs to be a prefix. As a result, some |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
53 ;; terminal/keyboard/window system configurations, which don't |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
54 ;; have a complete set of sensible function key map bindings, can |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
55 ;; still be configured for EDT Emulation. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
56 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
57 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
58 ;; Usage: |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
59 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
60 ;; Simply load this file into emacs (version 19 or higher) |
10690 | 61 ;; using the following command. |
62 | |
63 ;; emacs -q -l edt-mapper.el | |
64 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
65 ;; The "-q" option prevents loading of your .emacs file (commands |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
66 ;; therein might confuse this program). |
10690 | 67 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
68 ;; An instruction screen showing the typical LK-201 terminal |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
69 ;; functions keys will be displayed, and you will be prompted to |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
70 ;; press the keys on your keyboard which you want to emulate the |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
71 ;; corresponding LK-201 keys. |
10690 | 72 |
73 ;; Finally, you will be prompted for the name of the file to store | |
74 ;; the key definitions. If you chose the default, it will be found | |
75 ;; and loaded automatically when the EDT emulation is started. If | |
76 ;; you specify a different file name, you will need to set the | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
77 ;; variable "edt-keys-file" before starting the EDT emulation. |
10690 | 78 ;; Here's how you might go about doing that in your .emacs file. |
79 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
80 ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) |
10690 | 81 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
82 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
83 ;; Known Problems: |
10690 | 84 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
85 ;; Sometimes, edt-mapper will ignore a key you press, and just |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
86 ;; continue to prompt for the same key. This can happen when your |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
87 ;; window manager sucks up the key and doesn't pass it on to emacs, |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
88 ;; or it could be an emacs bug. Either way, there's nothing that |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
89 ;; edt-mapper can do about it. You must press RETURN, to skip the |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
90 ;; current key and continue. Later, you and/or your local Emacs guru |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
91 ;; can try to figure out why the key is being ignored. |
10690 | 92 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
93 ;;; History: |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
94 ;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
95 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
96 ;; Version 4.0 2000 Added 2 New Features |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
97 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
98 ;;; Code: |
10690 | 99 |
100 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
101 ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
102 ;;; Determine Window System, and X Server Vendor (if appropriate). |
10690 | 103 ;;; |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
104 (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
105 "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
106 |
95837 | 107 (declare-function x-server-vendor "xfns.c" (&optional terminal)) |
108 | |
109 (defconst edt-xserver (when (eq edt-window-system 'x) | |
110 ;; The Cygwin window manager has a `/' in its | |
111 ;; name, which breaks the generated file name of | |
112 ;; the custom key map file. Replace `/' with a | |
113 ;; `-' to work around that. | |
114 (if (featurep 'xemacs) | |
115 (replace-in-string (x-server-vendor) "[ /]" "-") | |
116 (replace-regexp-in-string "[ /]" "-" | |
117 (x-server-vendor)))) | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
118 "Indicates X server vendor name, if applicable.") |
10690 | 119 |
120 | |
121 ;;; | |
122 ;;; Key variables | |
123 ;;; | |
124 (defvar edt-key nil) | |
125 (defvar edt-enter nil) | |
126 (defvar edt-return nil) | |
127 (defvar edt-key-seq nil) | |
128 (defvar edt-enter-seq nil) | |
129 (defvar edt-return-seq nil) | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
130 (defvar edt-term nil) |
10690 | 131 |
63915
96d313e6f018
(edt-save-function-key-map, EDT-key-name): `defvar' to silence the
Juanma Barranquero <lekktu@gmail.com>
parents:
52401
diff
changeset
|
132 ;; To silence the byte-compiler |
95631
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
133 (defvar EDT-key-name) |
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
134 (defvar edt-save-function-key-map) |
63915
96d313e6f018
(edt-save-function-key-map, EDT-key-name): `defvar' to silence the
Juanma Barranquero <lekktu@gmail.com>
parents:
52401
diff
changeset
|
135 |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
136 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
137 ;;; Determine Terminal Type (if appropriate). |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
138 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
139 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
140 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
141 (setq edt-term nil) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
142 (setq edt-term (getenv "TERM"))) |
10690 | 143 |
144 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
145 ;;; Make sure the window is big enough to display the instructions, |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
146 ;;; except where window cannot be re-sized. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
147 ;;; |
10690 | 148 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
149 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
150 (set-frame-size (selected-frame) 80 36)) |
10690 | 151 |
152 ;;; | |
153 ;;; Create buffers - Directions and Keys | |
154 ;;; | |
155 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions")) | |
156 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys")) | |
157 | |
158 ;;; | |
159 ;;; Put header in the Keys buffer | |
160 ;;; | |
161 (set-buffer "Keys") | |
162 (insert "\ | |
163 ;; | |
164 ;; Key definitions for the EDT emulation within GNU Emacs | |
165 ;; | |
166 | |
167 (defconst *EDT-keys* | |
168 '( | |
169 ") | |
170 | |
171 ;;; | |
172 ;;; Display directions | |
173 ;;; | |
174 (switch-to-buffer "Directions") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
175 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
176 (insert " |
10690 | 177 EDT MAPPER |
178 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
179 You will be asked to press keys to create a custom mapping (under a |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
180 Window Manager) of your keypad keys and function keys so that they can |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
181 emulate the LK-201 keypad and function keys or the subset of keys found |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
182 on a VT-100 series terminal keyboard. (The LK-201 keyboard is the |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
183 standard keyboard attached to VT-200 series terminals, and above.) |
10690 | 184 |
185 Sometimes, edt-mapper will ignore a key you press, and just continue to | |
186 prompt for the same key. This can happen when your window manager sucks | |
73744
84aef5a30c72
Fix typo in interactive message.
Juanma Barranquero <lekktu@gmail.com>
parents:
68648
diff
changeset
|
187 up the key and doesn't pass it on to Emacs, or it could be an Emacs bug. |
10690 | 188 Either way, there's nothing that edt-mapper can do about it. You must |
189 press RETURN, to skip the current key and continue. Later, you and/or | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
190 your local system guru can try to figure out why the key is being ignored. |
10690 | 191 |
192 Start by pressing the RETURN key, and continue by pressing the keys | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
193 specified in the mini-buffer. If you want to entirely omit a key, |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
194 because your keyboard does not have a corresponding key, for example, |
10690 | 195 just press RETURN at the prompt. |
196 | |
197 ") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
198 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
199 EDT MAPPER |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
200 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
201 You will be asked to press keys to create a custom mapping of your |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
202 keypad keys and function keys so that they can emulate the LK-201 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
203 keypad and function keys or the subset of keys found on a VT-100 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
204 series terminal keyboard. (The LK-201 keyboard is the standard |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
205 keyboard attached to VT-200 series terminals, and above.) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
206 |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
207 If you are using a real LK-201 keyboard, you should map the keys |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
208 exactly as they are on the keyboard. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
209 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
210 Start by pressing the RETURN key, and continue by pressing the keys |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
211 specified in the mini-buffer. If you want to entirely omit a key, |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
212 because your keyboard does not have a corresponding key, for example, |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
213 just press RETURN at the prompt. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
214 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
215 ")) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
216 |
10690 | 217 (delete-other-windows) |
218 | |
219 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
220 ;;; Save <CR> for future reference. |
10690 | 221 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
222 ;;; For GNU Emacs, running in a Window System, first hide bindings in |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
223 ;;; function-key-map. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
224 ;;; |
10690 | 225 (cond |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
226 ((featurep 'xemacs) |
10690 | 227 (setq edt-return-seq (read-key-sequence "Hit carriage-return <CR> to continue ")) |
228 (setq edt-return (concat "[" (format "%s" (event-key (aref edt-return-seq 0))) "]"))) | |
229 (t | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
230 (if edt-window-system |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
231 (progn |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
232 (setq edt-save-function-key-map function-key-map) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
233 (setq function-key-map (make-sparse-keymap)))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
234 (setq edt-return (read-key-sequence "Hit carriage-return <CR> to continue ")))) |
10690 | 235 |
236 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
237 ;;; Remove prefix-key bindings to F1 and F2 in global-map so they can be |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
238 ;;; bound in the EDT Emulation mode. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
239 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
240 (global-unset-key [f1]) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
241 (global-unset-key [f2]) |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
242 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
243 ;;; |
10690 | 244 ;;; Display Keypad Diagram and Begin Prompting for Keys |
245 ;;; | |
246 (set-buffer "Directions") | |
247 (delete-region (point-min) (point-max)) | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
248 (if (and edt-window-system (not (eq edt-window-system 'tty))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
249 (insert " |
10690 | 250 |
251 PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW. | |
252 | |
253 Here's a picture of the standard LK-201 keypad for reference: | |
254 | |
255 _______________________ _______________________________ | |
256 | HELP | DO | | F17 | F18 | F19 | F20 | | |
257 | | | | | | | | | |
258 |_______|_______________| |_______|_______|_______|_______| | |
259 _______________________ _______________________________ | |
260 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | | |
261 | | | | | | | | | | |
262 |_______|_______|_______| |_______|_______|_______|_______| | |
263 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | | |
264 | | | | | | | | | | |
265 |_______|_______|_______| |_______|_______|_______|_______| | |
266 | UP | | KP4 | KP5 | KP6 | KP, | | |
267 | | | | | | | | |
268 _______|_______|_______ |_______|_______|_______|_______| | |
269 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | | |
270 | | | | | | | | | | |
271 |_______|_______|_______| |_______|_______|_______| KPE | | |
272 | KP0 | KPP | | | |
273 | | | | | |
274 |_______________|_______|_______| | |
275 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
276 REMEMBER: JUST PRESS RETURN TO SKIP MAPPING A KEY. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
277 |
10690 | 278 ") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
279 (progn |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
280 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
281 GENERATING A CUSTOM CONFIGURATION FILE FOR TERMINAL TYPE: ") |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
282 (insert (format "%s." edt-term)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
283 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
284 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
285 PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
286 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
287 _______________________ _______________________________ |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
288 | HELP | DO | | F17 | F18 | F19 | F20 | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
289 |_______|_______________| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
290 _______________________ _______________________________ |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
291 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
292 |_______|_______|_______| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
293 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
294 |_______|_______|_______| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
295 | UP | | KP4 | KP5 | KP6 | KP, | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
296 _______|_______|_______ |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
297 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
298 |_______|_______|_______| |_______|_______|_______| KPE | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
299 | KP0 | KPP | | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
300 |_______________|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
301 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
302 REMEMBER: JUST PRESS RETURN TO SKIP MAPPING A KEY."))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
303 |
10690 | 304 |
305 ;;; | |
306 ;;; Key mapping functions | |
307 ;;; | |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
308 (defun edt-map-key (ident descrip) |
10690 | 309 (interactive) |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
310 (if (featurep 'xemacs) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
311 (progn |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
312 (setq edt-key-seq (read-key-sequence (format "Press %s%s: " ident descrip))) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
313 (setq edt-key (concat "[" (format "%s" (event-key (aref edt-key-seq 0))) "]")) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
314 (cond ((not (equal edt-key edt-return)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
315 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
316 (insert (format " (\"%s\" . %s)\n" ident edt-key)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
317 (set-buffer "Directions")) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
318 ;; bogosity to get next prompt to come up, if the user hits <CR>! |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
319 ;; check periodically to see if this is still needed... |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
320 (t |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
321 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
322 (insert (format " (\"%s\" . \"\" )\n" ident)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
323 (set-buffer "Directions")))) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
324 (setq edt-key (read-key-sequence (format "Press %s%s: " ident descrip))) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
325 (cond ((not (equal edt-key edt-return)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
326 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
327 (insert (if (vectorp edt-key) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
328 (format " (\"%s\" . %s)\n" ident edt-key) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
329 (format " (\"%s\" . \"%s\")\n" ident edt-key))) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
330 (set-buffer "Directions")) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
331 ;; bogosity to get next prompt to come up, if the user hits <CR>! |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
332 ;; check periodically to see if this is still needed... |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
333 (t |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
334 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
335 (insert (format " (\"%s\" . \"\" )\n" ident)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
336 (set-buffer "Directions")))) |
10690 | 337 edt-key) |
338 | |
339 (set-buffer "Keys") | |
340 (insert " | |
341 ;; | |
342 ;; Arrows | |
343 ;; | |
344 ") | |
345 (set-buffer "Directions") | |
346 | |
347 (edt-map-key "UP" " - The Up Arrow Key") | |
348 (edt-map-key "DOWN" " - The Down Arrow Key") | |
349 (edt-map-key "LEFT" " - The Left Arrow Key") | |
350 (edt-map-key "RIGHT" " - The Right Arrow Key") | |
351 | |
352 | |
353 (set-buffer "Keys") | |
354 (insert " | |
355 ;; | |
356 ;; PF keys | |
357 ;; | |
358 ") | |
359 (set-buffer "Directions") | |
360 | |
361 (edt-map-key "PF1" " - The PF1 (GOLD) Key") | |
362 (edt-map-key "PF2" " - The Keypad PF2 Key") | |
363 (edt-map-key "PF3" " - The Keypad PF3 Key") | |
364 (edt-map-key "PF4" " - The Keypad PF4 Key") | |
365 | |
366 (set-buffer "Keys") | |
367 (insert " | |
368 ;; | |
369 ;; KP0-9 KP- KP, KPP and KPE | |
370 ;; | |
371 ") | |
372 (set-buffer "Directions") | |
373 | |
374 (edt-map-key "KP0" " - The Keypad 0 Key") | |
375 (edt-map-key "KP1" " - The Keypad 1 Key") | |
376 (edt-map-key "KP2" " - The Keypad 2 Key") | |
377 (edt-map-key "KP3" " - The Keypad 3 Key") | |
378 (edt-map-key "KP4" " - The Keypad 4 Key") | |
379 (edt-map-key "KP5" " - The Keypad 5 Key") | |
380 (edt-map-key "KP6" " - The Keypad 6 Key") | |
381 (edt-map-key "KP7" " - The Keypad 7 Key") | |
382 (edt-map-key "KP8" " - The Keypad 8 Key") | |
383 (edt-map-key "KP9" " - The Keypad 9 Key") | |
384 (edt-map-key "KP-" " - The Keypad - Key") | |
385 (edt-map-key "KP," " - The Keypad , Key") | |
386 (edt-map-key "KPP" " - The Keypad . Key") | |
387 (edt-map-key "KPE" " - The Keypad Enter Key") | |
388 ;; Save the enter key | |
389 (setq edt-enter edt-key) | |
390 (setq edt-enter-seq edt-key-seq) | |
391 | |
392 | |
393 (set-buffer "Keys") | |
394 (insert " | |
395 ;; | |
396 ;; Editing keypad (FIND, INSERT, REMOVE) | |
397 ;; (SELECT, PREVIOUS, NEXT) | |
398 ;; | |
399 ") | |
400 (set-buffer "Directions") | |
401 | |
402 (edt-map-key "FIND" " - The Find key on the editing keypad") | |
403 (edt-map-key "INSERT" " - The Insert key on the editing keypad") | |
404 (edt-map-key "REMOVE" " - The Remove key on the editing keypad") | |
405 (edt-map-key "SELECT" " - The Select key on the editing keypad") | |
406 (edt-map-key "PREVIOUS" " - The Prev Scr key on the editing keypad") | |
407 (edt-map-key "NEXT" " - The Next Scr key on the editing keypad") | |
408 | |
409 (set-buffer "Keys") | |
410 (insert " | |
411 ;; | |
412 ;; F1-14 Help Do F17-F20 | |
413 ;; | |
414 ") | |
415 (set-buffer "Directions") | |
416 | |
417 (edt-map-key "F1" " - F1 Function Key") | |
418 (edt-map-key "F2" " - F2 Function Key") | |
419 (edt-map-key "F3" " - F3 Function Key") | |
420 (edt-map-key "F4" " - F4 Function Key") | |
421 (edt-map-key "F5" " - F5 Function Key") | |
422 (edt-map-key "F6" " - F6 Function Key") | |
423 (edt-map-key "F7" " - F7 Function Key") | |
424 (edt-map-key "F8" " - F8 Function Key") | |
425 (edt-map-key "F9" " - F9 Function Key") | |
426 (edt-map-key "F10" " - F10 Function Key") | |
427 (edt-map-key "F11" " - F11 Function Key") | |
428 (edt-map-key "F12" " - F12 Function Key") | |
429 (edt-map-key "F13" " - F13 Function Key") | |
430 (edt-map-key "F14" " - F14 Function Key") | |
431 (edt-map-key "HELP" " - HELP Function Key") | |
432 (edt-map-key "DO" " - DO Function Key") | |
433 (edt-map-key "F17" " - F17 Function Key") | |
434 (edt-map-key "F18" " - F18 Function Key") | |
435 (edt-map-key "F19" " - F19 Function Key") | |
436 (edt-map-key "F20" " - F20 Function Key") | |
437 | |
438 (set-buffer "Directions") | |
439 (delete-region (point-min) (point-max)) | |
440 (insert " | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
441 ADDITIONAL FUNCTION KEYS |
10690 | 442 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
443 Your keyboard may have additional function keys which do not correspond |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
444 to any LK-201 keys. The EDT Emulation can be configured to recognize |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
445 those keys, since you may wish to add your own key bindings to those keys. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
446 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
447 For example, suppose your keyboard has a keycap marked \"Line Del\" and |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
448 you wish to add it to the list of keys which can be customized by the EDT |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
449 Emulation. First, assign a unique single-word name to the key for use by |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
450 the EDT Emulation, for example, \"linedel\". Then, at the \"EDT Key |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
451 Name:\" prompt, enter \"linedel\", followed by a press of the RETURN key. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
452 Finally, when prompted, press the \"Line Del\" key. You now will be able |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
453 to bind functions to \"linedel\" and \"Gold-linedel\" in edt-user.el in |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
454 just the same way you can customize bindings of the LK-201 function and |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
455 keypad keys. |
10690 | 456 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
457 When you are done, just press RETURN at the \"EDT Key Name:\" prompt. |
10690 | 458 ") |
459 (switch-to-buffer "Directions") | |
460 ;;; | |
461 ;;; Add support for extras keys | |
462 ;;; | |
463 (set-buffer "Keys") | |
464 (insert "\ | |
465 ;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
466 ;; Extra Keys |
10690 | 467 ;; |
468 ") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
469 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
470 ;;; Restore function-key-map. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
471 ;;; |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
472 (if (and edt-window-system (not (featurep 'xemacs))) |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
473 (setq function-key-map edt-save-function-key-map)) |
10690 | 474 (setq EDT-key-name "") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
475 (while (not |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
476 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) "")) |
10690 | 477 (edt-map-key EDT-key-name "")) |
478 | |
479 ; | |
480 ; No more keys to add, so wrap up. | |
481 ; | |
482 (set-buffer "Keys") | |
483 (insert "\ | |
484 ) | |
485 ) | |
486 ") | |
487 | |
488 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
489 ;;; Save the key mapping program |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
490 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
491 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
492 ;;; Save the key mapping file |
10690 | 493 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
494 (let ((file (concat |
85650
437a25964d35
* emulation/edt-mapper.el (edt-emacs-variant): Replace the only
Dan Nicolaescu <dann@ics.uci.edu>
parents:
85511
diff
changeset
|
495 "~/.edt-" (if (featurep 'xemacs) "xemacs" "gnu") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
496 (if edt-term (concat "-" edt-term)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
497 (if edt-xserver (concat "-" edt-xserver)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
498 (if edt-window-system (concat "-" (upcase (symbol-name edt-window-system)))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
499 "-keys"))) |
10690 | 500 (set-visited-file-name |
501 (read-file-name (format "Save key mapping to file (default %s): " file) nil file))) | |
502 (save-buffer) | |
503 | |
504 (message "That's it! Press any key to exit") | |
505 (sit-for 600) | |
506 (kill-emacs t) | |
507 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
508 ;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 |
10690 | 509 ;;; edt-mapper.el ends here |