Mercurial > emacs
annotate lisp/emulation/edt-mapper.el @ 95745:bea43f586395
(ftfont_pattern_entity): Adjusted for the change of font_intern_prop.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 10 Jun 2008 02:07:53 +0000 |
parents | 9a74acbaf005 |
children | 7ea2a6d03884 |
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, |
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
4 ;; 2007, 2008 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 |
9 | |
10691 | 10 ;; This file is part of GNU Emacs. |
10690 | 11 |
94658
eb7b2376cae5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
12 ;; GNU Emacs is free software: you can redistribute it and/or modify |
10690 | 13 ;; 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
|
14 ;; 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
|
15 ;; (at your option) any later version. |
10690 | 16 |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; 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
|
23 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
10690 | 24 |
25 ;;; Commentary: | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
26 ;; |
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 ;; [Part of the GNU Emacs EDT Emulation.] |
10690 | 29 |
30 ;; 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
|
31 ;; 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
|
32 ;; 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
|
33 ;; 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
|
34 ;; 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
|
35 ;; 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
|
36 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
37 ;; Version 4.0 contains the following enhancements: |
10690 | 38 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
39 ;; 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
|
40 ;; 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
|
41 ;; 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
|
42 ;; 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
|
43 ;; 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
|
44 ;; Servers typically require different EDT emulation |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
45 ;; 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
|
46 ;; 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
|
47 ;; names. |
10690 | 48 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
49 ;; 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
|
50 ;; 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
|
51 ;; 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
|
52 ;; 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
|
53 ;; 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
|
54 ;; still be configured for EDT Emulation. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
55 |
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 ;; Usage: |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
58 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
59 ;; Simply load this file into emacs (version 19 or higher) |
10690 | 60 ;; using the following command. |
61 | |
62 ;; emacs -q -l edt-mapper.el | |
63 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
64 ;; 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
|
65 ;; therein might confuse this program). |
10690 | 66 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
67 ;; 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
|
68 ;; 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
|
69 ;; 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
|
70 ;; corresponding LK-201 keys. |
10690 | 71 |
72 ;; Finally, you will be prompted for the name of the file to store | |
73 ;; the key definitions. If you chose the default, it will be found | |
74 ;; and loaded automatically when the EDT emulation is started. If | |
75 ;; 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
|
76 ;; variable "edt-keys-file" before starting the EDT emulation. |
10690 | 77 ;; Here's how you might go about doing that in your .emacs file. |
78 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
79 ;; (setq edt-keys-file (expand-file-name "~/.my-emacs-keys")) |
10690 | 80 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
81 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
82 ;; Known Problems: |
10690 | 83 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
84 ;; 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
|
85 ;; 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
|
86 ;; 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
|
87 ;; 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
|
88 ;; 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
|
89 ;; 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
|
90 ;; can try to figure out why the key is being ignored. |
10690 | 91 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
92 ;;; History: |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
93 ;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
94 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
95 ;; 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
|
96 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
97 ;;; Code: |
10690 | 98 |
99 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
100 ;;; Make sure we're running Emacs version 19, or higher. |
10690 | 101 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
102 |
10690 | 103 (cond |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
104 ((string-lessp emacs-version "19") |
10690 | 105 (insert " |
106 | |
107 Whoa! This isn't going to work... | |
108 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
109 You must run edt-mapper.el under Emacs version 19 or higher. |
10690 | 110 |
111 Press any key to exit. ") | |
112 (sit-for 600) | |
113 (kill-emacs t))) | |
114 | |
115 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
116 ;;; 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
|
117 ;;; Determine Window System, and X Server Vendor (if appropriate). |
10690 | 118 ;;; |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
119 (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
|
120 "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
|
121 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
122 (defconst edt-xserver (if (eq edt-window-system 'x) |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
123 (if (featurep 'xemacs) |
74641
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
124 ;; The Cygwin window manager has a `/' in its |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
125 ;; name, which breaks the generated file name of |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
126 ;; the custom key map file. Replace `/' with a |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
127 ;; `-' to work around that. |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
128 (replace-in-string (x-server-vendor) "[ /]" "-") |
11fae7eadf2d
Replace `/' with a `-', to fix a problem on Cygwin.
Eli Zaretskii <eliz@gnu.org>
parents:
73744
diff
changeset
|
129 (subst-char-in-string ?/ ?- (subst-char-in-string ? ?- (x-server-vendor)))) |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
130 nil) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
131 "Indicates X server vendor name, if applicable.") |
10690 | 132 |
133 | |
134 ;;; | |
135 ;;; Key variables | |
136 ;;; | |
137 (defvar edt-key nil) | |
138 (defvar edt-enter nil) | |
139 (defvar edt-return nil) | |
140 (defvar edt-key-seq nil) | |
141 (defvar edt-enter-seq nil) | |
142 (defvar edt-return-seq nil) | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
143 (defvar edt-term nil) |
10690 | 144 |
63915
96d313e6f018
(edt-save-function-key-map, EDT-key-name): `defvar' to silence the
Juanma Barranquero <lekktu@gmail.com>
parents:
52401
diff
changeset
|
145 ;; To silence the byte-compiler |
95631
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
146 (defvar EDT-key-name) |
9a74acbaf005
Remove unnecessary eval-when-compile.
Glenn Morris <rgm@gnu.org>
parents:
94658
diff
changeset
|
147 (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
|
148 |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
149 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
150 ;;; Determine Terminal Type (if appropriate). |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
151 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
152 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
153 (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
|
154 (setq edt-term nil) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
155 (setq edt-term (getenv "TERM"))) |
10690 | 156 |
157 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
158 ;;; 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
|
159 ;;; except where window cannot be re-sized. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
160 ;;; |
10690 | 161 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
162 (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
|
163 (set-frame-size (selected-frame) 80 36)) |
10690 | 164 |
165 ;;; | |
166 ;;; Create buffers - Directions and Keys | |
167 ;;; | |
168 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions")) | |
169 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys")) | |
170 | |
171 ;;; | |
172 ;;; Put header in the Keys buffer | |
173 ;;; | |
174 (set-buffer "Keys") | |
175 (insert "\ | |
176 ;; | |
177 ;; Key definitions for the EDT emulation within GNU Emacs | |
178 ;; | |
179 | |
180 (defconst *EDT-keys* | |
181 '( | |
182 ") | |
183 | |
184 ;;; | |
185 ;;; Display directions | |
186 ;;; | |
187 (switch-to-buffer "Directions") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
188 (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
|
189 (insert " |
10690 | 190 EDT MAPPER |
191 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
192 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
|
193 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
|
194 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
|
195 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
|
196 standard keyboard attached to VT-200 series terminals, and above.) |
10690 | 197 |
198 Sometimes, edt-mapper will ignore a key you press, and just continue to | |
199 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
|
200 up the key and doesn't pass it on to Emacs, or it could be an Emacs bug. |
10690 | 201 Either way, there's nothing that edt-mapper can do about it. You must |
202 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
|
203 your local system guru can try to figure out why the key is being ignored. |
10690 | 204 |
205 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
|
206 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
|
207 because your keyboard does not have a corresponding key, for example, |
10690 | 208 just press RETURN at the prompt. |
209 | |
210 ") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
211 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
212 EDT MAPPER |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
213 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
214 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
|
215 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
|
216 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
|
217 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
|
218 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
|
219 |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
220 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
|
221 exactly as they are on the keyboard. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
222 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
223 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
|
224 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
|
225 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
|
226 just press RETURN at the prompt. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
227 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
228 ")) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
229 |
10690 | 230 (delete-other-windows) |
231 | |
232 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
233 ;;; Save <CR> for future reference. |
10690 | 234 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
235 ;;; 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
|
236 ;;; function-key-map. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
237 ;;; |
10690 | 238 (cond |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
239 ((featurep 'xemacs) |
10690 | 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))) "]"))) | |
242 (t | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
243 (if edt-window-system |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
244 (progn |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
245 (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
|
246 (setq function-key-map (make-sparse-keymap)))) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
247 (setq edt-return (read-key-sequence "Hit carriage-return <CR> to continue ")))) |
10690 | 248 |
249 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
250 ;;; 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
|
251 ;;; bound in the EDT Emulation mode. |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
252 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
253 (global-unset-key [f1]) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
254 (global-unset-key [f2]) |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
255 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
256 ;;; |
10690 | 257 ;;; Display Keypad Diagram and Begin Prompting for Keys |
258 ;;; | |
259 (set-buffer "Directions") | |
260 (delete-region (point-min) (point-max)) | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
261 (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
|
262 (insert " |
10690 | 263 |
264 PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW. | |
265 | |
266 Here's a picture of the standard LK-201 keypad for reference: | |
267 | |
268 _______________________ _______________________________ | |
269 | HELP | DO | | F17 | F18 | F19 | F20 | | |
270 | | | | | | | | | |
271 |_______|_______________| |_______|_______|_______|_______| | |
272 _______________________ _______________________________ | |
273 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | | |
274 | | | | | | | | | | |
275 |_______|_______|_______| |_______|_______|_______|_______| | |
276 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | | |
277 | | | | | | | | | | |
278 |_______|_______|_______| |_______|_______|_______|_______| | |
279 | UP | | KP4 | KP5 | KP6 | KP, | | |
280 | | | | | | | | |
281 _______|_______|_______ |_______|_______|_______|_______| | |
282 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | | |
283 | | | | | | | | | | |
284 |_______|_______|_______| |_______|_______|_______| KPE | | |
285 | KP0 | KPP | | | |
286 | | | | | |
287 |_______________|_______|_______| | |
288 | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
289 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
|
290 |
10690 | 291 ") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
292 (progn |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
293 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
294 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
|
295 (insert (format "%s." edt-term)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
296 (insert " |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
297 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
298 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
|
299 |
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 | HELP | DO | | F17 | F18 | F19 | F20 | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
302 |_______|_______________| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
303 _______________________ _______________________________ |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
304 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
305 |_______|_______|_______| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
306 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
307 |_______|_______|_______| |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
308 | UP | | KP4 | KP5 | KP6 | KP, | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
309 _______|_______|_______ |_______|_______|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
310 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
311 |_______|_______|_______| |_______|_______|_______| KPE | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
312 | KP0 | KPP | | |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
313 |_______________|_______|_______| |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
314 |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
315 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
|
316 |
10690 | 317 |
318 ;;; | |
319 ;;; Key mapping functions | |
320 ;;; | |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
321 (defun edt-map-key (ident descrip) |
10690 | 322 (interactive) |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
323 (if (featurep 'xemacs) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
324 (progn |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
325 (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
|
326 (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
|
327 (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
|
328 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
329 (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
|
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")))) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
337 (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
|
338 (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
|
339 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
340 (insert (if (vectorp edt-key) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
341 (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
|
342 (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
|
343 (set-buffer "Directions")) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
344 ;; 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
|
345 ;; 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
|
346 (t |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
347 (set-buffer "Keys") |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
348 (insert (format " (\"%s\" . \"\" )\n" ident)) |
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
349 (set-buffer "Directions")))) |
10690 | 350 edt-key) |
351 | |
352 (set-buffer "Keys") | |
353 (insert " | |
354 ;; | |
355 ;; Arrows | |
356 ;; | |
357 ") | |
358 (set-buffer "Directions") | |
359 | |
360 (edt-map-key "UP" " - The Up Arrow Key") | |
361 (edt-map-key "DOWN" " - The Down Arrow Key") | |
362 (edt-map-key "LEFT" " - The Left Arrow Key") | |
363 (edt-map-key "RIGHT" " - The Right Arrow Key") | |
364 | |
365 | |
366 (set-buffer "Keys") | |
367 (insert " | |
368 ;; | |
369 ;; PF keys | |
370 ;; | |
371 ") | |
372 (set-buffer "Directions") | |
373 | |
374 (edt-map-key "PF1" " - The PF1 (GOLD) Key") | |
375 (edt-map-key "PF2" " - The Keypad PF2 Key") | |
376 (edt-map-key "PF3" " - The Keypad PF3 Key") | |
377 (edt-map-key "PF4" " - The Keypad PF4 Key") | |
378 | |
379 (set-buffer "Keys") | |
380 (insert " | |
381 ;; | |
382 ;; KP0-9 KP- KP, KPP and KPE | |
383 ;; | |
384 ") | |
385 (set-buffer "Directions") | |
386 | |
387 (edt-map-key "KP0" " - The Keypad 0 Key") | |
388 (edt-map-key "KP1" " - The Keypad 1 Key") | |
389 (edt-map-key "KP2" " - The Keypad 2 Key") | |
390 (edt-map-key "KP3" " - The Keypad 3 Key") | |
391 (edt-map-key "KP4" " - The Keypad 4 Key") | |
392 (edt-map-key "KP5" " - The Keypad 5 Key") | |
393 (edt-map-key "KP6" " - The Keypad 6 Key") | |
394 (edt-map-key "KP7" " - The Keypad 7 Key") | |
395 (edt-map-key "KP8" " - The Keypad 8 Key") | |
396 (edt-map-key "KP9" " - The Keypad 9 Key") | |
397 (edt-map-key "KP-" " - The Keypad - Key") | |
398 (edt-map-key "KP," " - The Keypad , Key") | |
399 (edt-map-key "KPP" " - The Keypad . Key") | |
400 (edt-map-key "KPE" " - The Keypad Enter Key") | |
401 ;; Save the enter key | |
402 (setq edt-enter edt-key) | |
403 (setq edt-enter-seq edt-key-seq) | |
404 | |
405 | |
406 (set-buffer "Keys") | |
407 (insert " | |
408 ;; | |
409 ;; Editing keypad (FIND, INSERT, REMOVE) | |
410 ;; (SELECT, PREVIOUS, NEXT) | |
411 ;; | |
412 ") | |
413 (set-buffer "Directions") | |
414 | |
415 (edt-map-key "FIND" " - The Find key on the editing keypad") | |
416 (edt-map-key "INSERT" " - The Insert key on the editing keypad") | |
417 (edt-map-key "REMOVE" " - The Remove key on the editing keypad") | |
418 (edt-map-key "SELECT" " - The Select key on the editing keypad") | |
419 (edt-map-key "PREVIOUS" " - The Prev Scr key on the editing keypad") | |
420 (edt-map-key "NEXT" " - The Next Scr key on the editing keypad") | |
421 | |
422 (set-buffer "Keys") | |
423 (insert " | |
424 ;; | |
425 ;; F1-14 Help Do F17-F20 | |
426 ;; | |
427 ") | |
428 (set-buffer "Directions") | |
429 | |
430 (edt-map-key "F1" " - F1 Function Key") | |
431 (edt-map-key "F2" " - F2 Function Key") | |
432 (edt-map-key "F3" " - F3 Function Key") | |
433 (edt-map-key "F4" " - F4 Function Key") | |
434 (edt-map-key "F5" " - F5 Function Key") | |
435 (edt-map-key "F6" " - F6 Function Key") | |
436 (edt-map-key "F7" " - F7 Function Key") | |
437 (edt-map-key "F8" " - F8 Function Key") | |
438 (edt-map-key "F9" " - F9 Function Key") | |
439 (edt-map-key "F10" " - F10 Function Key") | |
440 (edt-map-key "F11" " - F11 Function Key") | |
441 (edt-map-key "F12" " - F12 Function Key") | |
442 (edt-map-key "F13" " - F13 Function Key") | |
443 (edt-map-key "F14" " - F14 Function Key") | |
444 (edt-map-key "HELP" " - HELP Function Key") | |
445 (edt-map-key "DO" " - DO Function Key") | |
446 (edt-map-key "F17" " - F17 Function Key") | |
447 (edt-map-key "F18" " - F18 Function Key") | |
448 (edt-map-key "F19" " - F19 Function Key") | |
449 (edt-map-key "F20" " - F20 Function Key") | |
450 | |
451 (set-buffer "Directions") | |
452 (delete-region (point-min) (point-max)) | |
453 (insert " | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
454 ADDITIONAL FUNCTION KEYS |
10690 | 455 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
456 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
|
457 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
|
458 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
|
459 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
460 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
|
461 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
|
462 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
|
463 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
|
464 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
|
465 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
|
466 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
|
467 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
|
468 keypad keys. |
10690 | 469 |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
470 When you are done, just press RETURN at the \"EDT Key Name:\" prompt. |
10690 | 471 ") |
472 (switch-to-buffer "Directions") | |
473 ;;; | |
474 ;;; Add support for extras keys | |
475 ;;; | |
476 (set-buffer "Keys") | |
477 (insert "\ | |
478 ;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
479 ;; Extra Keys |
10690 | 480 ;; |
481 ") | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
482 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
483 ;;; Restore function-key-map. |
47940
c6a3d10a0675
(top-level): Fix typo.
Juanma Barranquero <lekktu@gmail.com>
parents:
42206
diff
changeset
|
484 ;;; |
85511
f873840f9fea
* emulation/edt-mapper.el (function-key-map):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
78218
diff
changeset
|
485 (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
|
486 (setq function-key-map edt-save-function-key-map)) |
10690 | 487 (setq EDT-key-name "") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
488 (while (not |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
489 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) "")) |
10690 | 490 (edt-map-key EDT-key-name "")) |
491 | |
492 ; | |
493 ; No more keys to add, so wrap up. | |
494 ; | |
495 (set-buffer "Keys") | |
496 (insert "\ | |
497 ) | |
498 ) | |
499 ") | |
500 | |
501 ;;; | |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
502 ;;; Save the key mapping program |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
503 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
504 ;;; |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
505 ;;; Save the key mapping file |
10690 | 506 ;;; |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
507 (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
|
508 "~/.edt-" (if (featurep 'xemacs) "xemacs" "gnu") |
35123
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
509 (if edt-term (concat "-" edt-term)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
510 (if edt-xserver (concat "-" edt-xserver)) |
767b546e1676
Update to version 4.0. Provide support
Gerd Moellmann <gerd@gnu.org>
parents:
18942
diff
changeset
|
511 (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
|
512 "-keys"))) |
10690 | 513 (set-visited-file-name |
514 (read-file-name (format "Save key mapping to file (default %s): " file) nil file))) | |
515 (save-buffer) | |
516 | |
517 (message "That's it! Press any key to exit") | |
518 (sit-for 600) | |
519 (kill-emacs t) | |
520 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
521 ;; arch-tag: 9eea59c8-b8b7-4d66-b858-c8920624c518 |
10690 | 522 ;;; edt-mapper.el ends here |