annotate lisp/emulation/edt-mapper.el @ 33278:7b666d4d4007

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