annotate lisp/emulation/edt-mapper.el @ 13093:36df4ecc47da

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