annotate lisp/emulators/edt-mapper.el @ 4:b82b59fe008d r19-15b3

Import from CVS: tag r19-15b3
author cvs
date Mon, 13 Aug 2007 08:46:56 +0200
parents
children e45d5e7c476e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
1 ;;; edt-mapper.el --- Create an EDT LK-201 Map File for X-Windows Emacs
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
2
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
3 ;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
5 ;; Author: Kevin Gallagher <kgallagh@spd.dsccc.com>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
6 ;; Maintainer: Kevin Gallagher <kgallagh@spd.dsccc.com>
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
7 ;; Keywords: emulations
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
8
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
10
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
14 ;; any later version.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
15
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
19 ;; General Public License for more details.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
20
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
25
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
26 ;;; Synched up with: FSF 19.34
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
27
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
28 ;;; Commentary:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30 ;; This emacs lisp program can be used to create an emacs lisp file
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
31 ;; that defines the mapping of the user's keyboard under X-Windows to
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
32 ;; the LK-201 keyboard function keys and keypad keys (around which
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
33 ;; EDT has been designed). Please read the "Usage" AND "Known
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
34 ;; Problems" sections before attempting to run this program. (The
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
35 ;; design of this file, edt-mapper.el, was heavily influenced by
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
36 ;; tpu-mapper.el.)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
37
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
38 ;;; Usage:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
39
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40 ;; Simply load this file into the X-Windows version of emacs (version 19)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
41 ;; using the following command.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 ;; emacs -q -l edt-mapper.el
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
44
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
45 ;; The "-q" option prevents loading of your .emacs file (commands therein
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46 ;; might confuse this program).
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
47
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
48 ;; An instruction screen showing the typical LK-201 terminal functions keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
49 ;; will be displayed, and you will be prompted to press the keys on your
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
50 ;; keyboard which you want to emulate the corresponding LK-201 keys.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
51
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
52 ;; Finally, you will be prompted for the name of the file to store
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
53 ;; the key definitions. If you chose the default, it will be found
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
54 ;; and loaded automatically when the EDT emulation is started. If
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
55 ;; you specify a different file name, you will need to set the
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
56 ;; variable "edt-xkeys-file" before starting the EDT emulation.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
57 ;; Here's how you might go about doing that in your .emacs file.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
58
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
59 ;; (setq edt-xkeys-file (expand-file-name "~/.my-emacs-x-keys"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
60
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
61 ;;; Known Problems:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
62
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
63 ;; Sometimes, edt-mapper will ignore a key you press, and just continue to
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
64 ;; prompt for the same key. This can happen when your window manager sucks
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
65 ;; up the key and doesn't pass it on to emacs, or it could be an emacs bug.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
66 ;; Either way, there's nothing that edt-mapper can do about it. You must
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
67 ;; press RETURN, to skip the current key and continue. Later, you and/or
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
68 ;; your local X guru can try to figure out why the key is being ignored.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
69
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
70 ;; ====================================================================
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
71
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
72 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
73 ;;; Make sure we're running X-windows and Emacs version 19
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
74 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
75 (cond
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
76 ((not (and window-system (not (string-lessp emacs-version "19"))))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
77 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
78
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
79 Whoa! This isn't going to work...
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
80
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
81 You must run edt-mapper.el under X-windows and Emacs version 19.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
82
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
83 Press any key to exit. ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
84 (sit-for 600)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
85 (kill-emacs t)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
86
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
87
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
88 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
89 ;;; Decide whether we're running GNU or Lucid emacs.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
90 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
91 (defconst edt-lucid-emacs19-p (string-match "Lucid" emacs-version)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
92 "Non-NIL if we are running Lucid Emacs version 19.")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
93
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
94
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
95 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
96 ;;; Key variables
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
97 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
98 (defvar edt-key nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
99 (defvar edt-enter nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
100 (defvar edt-return nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
101 (defvar edt-key-seq nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
102 (defvar edt-enter-seq nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
103 (defvar edt-return-seq nil)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
104
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
105
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
106 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
107 ;;; Make sure the window is big enough to display the instructions
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
108 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
109 (if edt-lucid-emacs19-p (set-screen-size nil 80 36)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
110 (set-frame-size (selected-frame) 80 36))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
111
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
112
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
113 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
114 ;;; Create buffers - Directions and Keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
115 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
116 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
117 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
118
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
119 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
120 ;;; Put header in the Keys buffer
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
121 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
122 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
123 (insert "\
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
124 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
125 ;; Key definitions for the EDT emulation within GNU Emacs
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
126 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
127
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
128 (defconst *EDT-keys*
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
129 '(
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
130 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
131
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
132 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
133 ;;; Display directions
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
134 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
135 (switch-to-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
136 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
137 EDT MAPPER
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
138
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
139 You will be asked to press keys to create a custom mapping (under
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
140 X-Windows) of your keypad keys and function keys so that they can emulate
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
141 the LK-201 keypad and function keys or the subset of keys found on a
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
142 VT-100 series terminal keyboard. (The LK-201 keyboard is the standard
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
143 keyboard attached to VT-200 series terminals, and above.)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
144
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
145 Sometimes, edt-mapper will ignore a key you press, and just continue to
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
146 prompt for the same key. This can happen when your window manager sucks
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
147 up the key and doesn't pass it on to emacs, or it could be an emacs bug.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
148 Either way, there's nothing that edt-mapper can do about it. You must
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
149 press RETURN, to skip the current key and continue. Later, you and/or
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
150 your local X guru can try to figure out why the key is being ignored.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
151
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
152 Start by pressing the RETURN key, and continue by pressing the keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
153 specified in the mini-buffer. If you want to entirely omit a key,
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
154 because your keyboard does not have a corresponding key, for example,
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
155 just press RETURN at the prompt.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
156
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
157 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
158 (delete-other-windows)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
159
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
160 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
161 ;;; Save <CR> for future reference
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
162 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
163 (cond
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
164 (edt-lucid-emacs19-p
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
165 (setq edt-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
166 (setq edt-return (concat "[" (format "%s" (event-key (aref edt-return-seq 0))) "]")))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
167 (t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
168 (message "Hit carriage-return <CR> to continue ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
169 (setq edt-return-seq (read-event))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
170 (setq edt-return (concat "[" (format "%s" edt-return-seq) "]"))))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
171
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
172 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
173 ;;; Display Keypad Diagram and Begin Prompting for Keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
174 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
175 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
176 (delete-region (point-min) (point-max))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
177 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
178
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
179
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
180
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
181 PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
182
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
183
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
184
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
185
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
186 Here's a picture of the standard LK-201 keypad for reference:
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
187
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
188 _______________________ _______________________________
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
189 | HELP | DO | | F17 | F18 | F19 | F20 |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
190 | | | | | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
191 |_______|_______________| |_______|_______|_______|_______|
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
192 _______________________ _______________________________
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
193 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
194 | | | | | | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
195 |_______|_______|_______| |_______|_______|_______|_______|
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
196 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
197 | | | | | | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
198 |_______|_______|_______| |_______|_______|_______|_______|
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
199 | UP | | KP4 | KP5 | KP6 | KP, |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
200 | | | | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
201 _______|_______|_______ |_______|_______|_______|_______|
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
202 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
203 | | | | | | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
204 |_______|_______|_______| |_______|_______|_______| KPE |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
205 | KP0 | KPP | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
206 | | | |
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
207 |_______________|_______|_______|
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
208
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
209 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
210
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
211 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
212 ;;; Key mapping functions
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
213 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
214 (defun edt-lucid-map-key (ident descrip)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
215 (interactive)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
216 (setq edt-key-seq (read-key-sequence (format "Press %s%s: " ident descrip)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
217 (setq edt-key (concat "[" (format "%s" (event-key (aref edt-key-seq 0))) "]"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
218 (cond ((not (equal edt-key edt-return))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
219 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
220 (insert (format " (\"%s\" . %s)\n" ident edt-key))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
221 (set-buffer "Directions"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
222 ;; bogosity to get next prompt to come up, if the user hits <CR>!
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
223 ;; check periodically to see if this is still needed...
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
224 (t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
225 (format "%s" edt-key)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
226 edt-key)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
227
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
228 (defun edt-gnu-map-key (ident descrip)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
229 (interactive)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
230 (message "Press %s%s: " ident descrip)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
231 (setq edt-key-seq (read-event))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
232 (setq edt-key (concat "[" (format "%s" edt-key-seq) "]"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
233 (cond ((not (equal edt-key edt-return))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
234 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
235 (insert (format " (\"%s\" . %s)\n" ident edt-key))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
236 (set-buffer "Directions"))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
237 ;; bogosity to get next prompt to come up, if the user hits <CR>!
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
238 ;; check periodically to see if this is still needed...
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
239 (t
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
240 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
241 (insert (format " (\"%s\" . \"\" )\n" ident))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
242 (set-buffer "Directions")))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
243 edt-key)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
244
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
245 (fset 'edt-map-key (if edt-lucid-emacs19-p 'edt-lucid-map-key 'edt-gnu-map-key))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
246 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
247 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
248 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
249 ;; Arrows
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
250 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
251 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
252 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
253
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
254 (edt-map-key "UP" " - The Up Arrow Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
255 (edt-map-key "DOWN" " - The Down Arrow Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
256 (edt-map-key "LEFT" " - The Left Arrow Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
257 (edt-map-key "RIGHT" " - The Right Arrow Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
258
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
259
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
260 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
261 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
262 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
263 ;; PF keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
264 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
265 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
266 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
267
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
268 (edt-map-key "PF1" " - The PF1 (GOLD) Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
269 (edt-map-key "PF2" " - The Keypad PF2 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
270 (edt-map-key "PF3" " - The Keypad PF3 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
271 (edt-map-key "PF4" " - The Keypad PF4 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
272
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
273 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
274 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
275 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
276 ;; KP0-9 KP- KP, KPP and KPE
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
277 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
278 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
279 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
280
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
281 (edt-map-key "KP0" " - The Keypad 0 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
282 (edt-map-key "KP1" " - The Keypad 1 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
283 (edt-map-key "KP2" " - The Keypad 2 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
284 (edt-map-key "KP3" " - The Keypad 3 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
285 (edt-map-key "KP4" " - The Keypad 4 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
286 (edt-map-key "KP5" " - The Keypad 5 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
287 (edt-map-key "KP6" " - The Keypad 6 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
288 (edt-map-key "KP7" " - The Keypad 7 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
289 (edt-map-key "KP8" " - The Keypad 8 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
290 (edt-map-key "KP9" " - The Keypad 9 Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
291 (edt-map-key "KP-" " - The Keypad - Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
292 (edt-map-key "KP," " - The Keypad , Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
293 (edt-map-key "KPP" " - The Keypad . Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
294 (edt-map-key "KPE" " - The Keypad Enter Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
295 ;; Save the enter key
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
296 (setq edt-enter edt-key)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
297 (setq edt-enter-seq edt-key-seq)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
298
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
299
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
300 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
301 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
302 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
303 ;; Editing keypad (FIND, INSERT, REMOVE)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
304 ;; (SELECT, PREVIOUS, NEXT)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
305 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
306 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
307 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
308
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
309 (edt-map-key "FIND" " - The Find key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
310 (edt-map-key "INSERT" " - The Insert key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
311 (edt-map-key "REMOVE" " - The Remove key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
312 (edt-map-key "SELECT" " - The Select key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
313 (edt-map-key "PREVIOUS" " - The Prev Scr key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
314 (edt-map-key "NEXT" " - The Next Scr key on the editing keypad")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
315
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
316 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
317 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
318 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
319 ;; F1-14 Help Do F17-F20
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
320 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
321 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
322 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
323
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
324 (edt-map-key "F1" " - F1 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
325 (edt-map-key "F2" " - F2 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
326 (edt-map-key "F3" " - F3 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
327 (edt-map-key "F4" " - F4 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
328 (edt-map-key "F5" " - F5 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
329 (edt-map-key "F6" " - F6 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
330 (edt-map-key "F7" " - F7 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
331 (edt-map-key "F8" " - F8 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
332 (edt-map-key "F9" " - F9 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
333 (edt-map-key "F10" " - F10 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
334 (edt-map-key "F11" " - F11 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
335 (edt-map-key "F12" " - F12 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
336 (edt-map-key "F13" " - F13 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
337 (edt-map-key "F14" " - F14 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
338 (edt-map-key "HELP" " - HELP Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
339 (edt-map-key "DO" " - DO Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
340 (edt-map-key "F17" " - F17 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
341 (edt-map-key "F18" " - F18 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
342 (edt-map-key "F19" " - F19 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
343 (edt-map-key "F20" " - F20 Function Key")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
344
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
345 (set-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
346 (delete-region (point-min) (point-max))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
347 (insert "
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
348 ADDITIONAL FUNCTION KEYS
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
349
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
350 Your keyboard may have additional function keys which do not
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
351 correspond to any LK-201 keys. The EDT Emulation can be
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
352 configured to recognize those keys, since you may wish to add your
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
353 own key bindings to those keys.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
354
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
355 For example, suppose your keyboard has a keycap marked \"Line Del\"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
356 and you wish to add it to the list of keys which can be customized
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
357 by the EDT Emulation. First, assign a unique single-word name to
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
358 the key for use by the EDT Emulation, let's say \"linedel\", in this
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
359 example. Then, at the \"EDT Key Name:\" prompt, enter \"linedel\",
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
360 followed by a press of the RETURN key. Finally, when prompted,
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
361 press the \"Line Del\" key. You now will be able to bind functions
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
362 to \"linedel\" and \"Gold-linedel\" in edt-user.el in just the same way
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
363 you can customize bindings of the standard LK-201 keys.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
364
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
365 When you have no additional function keys to specify, just press
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
366 RETURN at the \"EDT Key Name:\" prompt. (If you change your mind
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
367 AFTER you enter an EDT Key Name and before you press a key at the
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
368 \"Press\" prompt, you may omit the key by simply pressing RETURN at
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
369 the prompt.)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
370 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
371 (switch-to-buffer "Directions")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
372 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
373 ;;; Add support for extras keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
374 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
375 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
376 (insert "\
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
377 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
378 ;; Extra Keys
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
379 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
380 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
381 (setq EDT-key-name "")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
382 (while (not
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
383 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) ""))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
384 (edt-map-key EDT-key-name ""))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
385
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
386 ;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
387 ; No more keys to add, so wrap up.
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
388 ;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
389 (set-buffer "Keys")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
390 (insert "\
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
391 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
392 )
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
393 ")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
394
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
395 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
396 ;;; Save the key mapping program and blow this pop stand
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
397 ;;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
398 (let ((file (if edt-lucid-emacs19-p "~/.edt-lucid-keys" "~/.edt-gnu-keys")))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
399 (set-visited-file-name
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
400 (read-file-name (format "Save key mapping to file (default %s): " file) nil file)))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
401 (save-buffer)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
402
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
403 (message "That's it! Press any key to exit")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
404 (sit-for 600)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
405 (kill-emacs t)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
406
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
407 ;;; edt-mapper.el ends here