annotate lisp/emulation/edt-mapper.el @ 11277:d4547e4b0aab

(read_process_output_error_handler) (exec_sentinel_error_handler): Fsleep_for wants two args.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Apr 1995 22:41:58 +0000
parents 4d2a2fe1d8d7
children 4c3bd306e20d
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 ;;; Revision Information
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
73 ;;;
11234
4d2a2fe1d8d7 Update copyright.
Karl Heuer <kwzh@gnu.org>
parents: 10691
diff changeset
74 (defconst edt-mapper-revision "$Revision: 1.2 $"
10690
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
75 "Revision Number of EDT X-Windows Emacs Key Mapper.")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
76
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
77
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
78 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
79 ;;; Make sure we're running 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 (cond
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
82 ((not (and window-system (not (string-lessp emacs-version "19"))))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
83 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
84
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
85 Whoa! This isn't going to work...
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
86
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
87 You must run edt-mapper.el under X-windows and Emacs version 19.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
88
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
89 Press any key to exit. ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
90 (sit-for 600)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
91 (kill-emacs t)))
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 ;;; Decide whether we're running GNU or Lucid emacs.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
96 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
97 (defconst edt-lucid-emacs19-p (string-match "Lucid" emacs-version)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
98 "Non-NIL if we are running Lucid Emacs version 19.")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
99
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
100
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
101 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
102 ;;; Key variables
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
103 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
104 (defvar edt-key nil)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
105 (defvar edt-enter nil)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
106 (defvar edt-return nil)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
107 (defvar edt-key-seq nil)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
108 (defvar edt-enter-seq nil)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
109 (defvar edt-return-seq nil)
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 ;;; Make sure the window is big enough to display the instructions
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 edt-lucid-emacs19-p (set-screen-size nil 80 36)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
116 (set-frame-size (selected-frame) 80 36))
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 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
120 ;;; Create buffers - Directions and Keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
121 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
122 (if (not (get-buffer "Directions")) (generate-new-buffer "Directions"))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
123 (if (not (get-buffer "Keys")) (generate-new-buffer "Keys"))
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 ;;; Put header in the Keys buffer
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
127 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
128 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
129 (insert "\
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
130 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
131 ;; Key definitions for the EDT emulation within GNU Emacs
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
132 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
133
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
134 (defconst *EDT-keys*
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
135 '(
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
136 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
137
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
138 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
139 ;;; Display directions
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
140 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
141 (switch-to-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
142 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
143 EDT MAPPER
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
144
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
145 You will be asked to press keys to create a custom mapping (under
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
146 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
147 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
148 VT-100 series terminal keyboard. (The LK-201 keyboard is the standard
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
149 keyboard attached to VT-200 series terminals, and above.)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
150
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
151 Sometimes, edt-mapper will ignore a key you press, and just continue to
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
152 prompt for the same key. This can happen when your window manager sucks
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
153 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
154 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
155 press RETURN, to skip the current key and continue. Later, you and/or
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
156 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
157
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
158 Start by pressing the RETURN key, and continue by pressing the keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
159 specified in the mini-buffer. If you want to entirely omit a key,
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
160 because your keyboard does not have a corresponding key, for example,
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
161 just press RETURN at the prompt.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
162
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
163 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
164 (delete-other-windows)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
165
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
166 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
167 ;;; Save <CR> for future reference
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
168 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
169 (cond
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
170 (edt-lucid-emacs19-p
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
171 (setq edt-return-seq (read-key-sequence "Hit carriage-return <CR> to continue "))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
172 (setq edt-return (concat "[" (format "%s" (event-key (aref edt-return-seq 0))) "]")))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
173 (t
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
174 (message "Hit carriage-return <CR> to continue ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
175 (setq edt-return-seq (read-event))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
176 (setq edt-return (concat "[" (format "%s" edt-return-seq) "]"))))
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 ;;; Display Keypad Diagram and Begin Prompting for Keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
180 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
181 (set-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
182 (delete-region (point-min) (point-max))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
183 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
184
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 PRESS THE KEY SPECIFIED IN THE MINIBUFFER BELOW.
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
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
192 Here's a picture of the standard LK-201 keypad for reference:
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 | HELP | DO | | F17 | F18 | F19 | F20 |
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 _______________________ _______________________________
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
199 | FIND |INSERT |REMOVE | | PF1 | PF2 | PF3 | PF4 |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
200 | | | | | | | | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
201 |_______|_______|_______| |_______|_______|_______|_______|
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
202 |SELECT |PREVIOU| NEXT | | KP7 | KP8 | KP9 | KP- |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
203 | | | | | | | | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
204 |_______|_______|_______| |_______|_______|_______|_______|
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
205 | UP | | KP4 | KP5 | KP6 | KP, |
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 | LEFT | DOWN | RIGHT | | KP1 | KP2 | KP3 | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
209 | | | | | | | | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
210 |_______|_______|_______| |_______|_______|_______| KPE |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
211 | KP0 | KPP | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
212 | | | |
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
213 |_______________|_______|_______|
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
214
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
215 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
216
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
217 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
218 ;;; Key mapping functions
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
219 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
220 (defun edt-lucid-map-key (ident descrip func gold-func)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
221 (interactive)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
222 (setq edt-key-seq (read-key-sequence (format "Press %s%s: " ident descrip)))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
223 (setq edt-key (concat "[" (format "%s" (event-key (aref edt-key-seq 0))) "]"))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
224 (cond ((not (equal edt-key edt-return))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
225 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
226 (insert (format " (\"%s\" . %s)\n" ident edt-key))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
227 (set-buffer "Directions"))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
228 ;; bogosity to get next prompt to come up, if the user hits <CR>!
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
229 ;; check periodically to see if this is still needed...
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
230 (t
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
231 (format "%s" edt-key)))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
232 edt-key)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
233
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
234 (defun edt-gnu-map-key (ident descrip)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
235 (interactive)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
236 (message "Press %s%s: " ident descrip)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
237 (setq edt-key-seq (read-event))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
238 (setq edt-key (concat "[" (format "%s" edt-key-seq) "]"))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
239 (cond ((not (equal edt-key edt-return))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
240 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
241 (insert (format " (\"%s\" . %s)\n" ident edt-key))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
242 (set-buffer "Directions"))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
243 ;; bogosity to get next prompt to come up, if the user hits <CR>!
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
244 ;; check periodically to see if this is still needed...
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
245 (t
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
246 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
247 (insert (format " (\"%s\" . \"\" )\n" ident))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
248 (set-buffer "Directions")))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
249 edt-key)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
250
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
251 (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
252 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
253 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
254 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
255 ;; Arrows
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 "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
259
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
260 (edt-map-key "UP" " - The Up Arrow Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
261 (edt-map-key "DOWN" " - The Down Arrow Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
262 (edt-map-key "LEFT" " - The Left Arrow Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
263 (edt-map-key "RIGHT" " - The Right Arrow Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
264
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
265
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
266 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
267 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
268 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
269 ;; PF keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
270 ;;
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 "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
273
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
274 (edt-map-key "PF1" " - The PF1 (GOLD) Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
275 (edt-map-key "PF2" " - The Keypad PF2 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
276 (edt-map-key "PF3" " - The Keypad PF3 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
277 (edt-map-key "PF4" " - The Keypad PF4 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
278
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
279 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
280 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
281 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
282 ;; KP0-9 KP- KP, KPP and KPE
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
283 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
284 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
285 (set-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
286
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
287 (edt-map-key "KP0" " - The Keypad 0 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
288 (edt-map-key "KP1" " - The Keypad 1 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
289 (edt-map-key "KP2" " - The Keypad 2 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
290 (edt-map-key "KP3" " - The Keypad 3 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
291 (edt-map-key "KP4" " - The Keypad 4 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
292 (edt-map-key "KP5" " - The Keypad 5 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
293 (edt-map-key "KP6" " - The Keypad 6 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
294 (edt-map-key "KP7" " - The Keypad 7 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
295 (edt-map-key "KP8" " - The Keypad 8 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
296 (edt-map-key "KP9" " - The Keypad 9 Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
297 (edt-map-key "KP-" " - The Keypad - Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
298 (edt-map-key "KP," " - The Keypad , Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
299 (edt-map-key "KPP" " - The Keypad . Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
300 (edt-map-key "KPE" " - The Keypad Enter Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
301 ;; Save the enter key
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
302 (setq edt-enter edt-key)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
303 (setq edt-enter-seq edt-key-seq)
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 "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
307 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
308 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
309 ;; Editing keypad (FIND, INSERT, REMOVE)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
310 ;; (SELECT, PREVIOUS, NEXT)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
311 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
312 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
313 (set-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
314
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
315 (edt-map-key "FIND" " - The Find key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
316 (edt-map-key "INSERT" " - The Insert key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
317 (edt-map-key "REMOVE" " - The Remove key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
318 (edt-map-key "SELECT" " - The Select key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
319 (edt-map-key "PREVIOUS" " - The Prev Scr key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
320 (edt-map-key "NEXT" " - The Next Scr key on the editing keypad")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
321
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
322 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
323 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
324 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
325 ;; F1-14 Help Do F17-F20
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
326 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
327 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
328 (set-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
329
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
330 (edt-map-key "F1" " - F1 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
331 (edt-map-key "F2" " - F2 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
332 (edt-map-key "F3" " - F3 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
333 (edt-map-key "F4" " - F4 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
334 (edt-map-key "F5" " - F5 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
335 (edt-map-key "F6" " - F6 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
336 (edt-map-key "F7" " - F7 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
337 (edt-map-key "F8" " - F8 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
338 (edt-map-key "F9" " - F9 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
339 (edt-map-key "F10" " - F10 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
340 (edt-map-key "F11" " - F11 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
341 (edt-map-key "F12" " - F12 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
342 (edt-map-key "F13" " - F13 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
343 (edt-map-key "F14" " - F14 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
344 (edt-map-key "HELP" " - HELP Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
345 (edt-map-key "DO" " - DO Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
346 (edt-map-key "F17" " - F17 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
347 (edt-map-key "F18" " - F18 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
348 (edt-map-key "F19" " - F19 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
349 (edt-map-key "F20" " - F20 Function Key")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
350
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
351 (set-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
352 (delete-region (point-min) (point-max))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
353 (insert "
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
354 ADDITIONAL FUNCTION KEYS
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
355
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
356 Your keyboard may have additional function keys which do not
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
357 correspond to any LK-201 keys. The EDT Emulation can be
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
358 configured to recognize those keys, since you may wish to add your
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
359 own key bindings to those keys.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
360
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
361 For example, suppose your keyboard has a keycap marked \"Line Del\"
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
362 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
363 by the EDT Emulation. First, assign a unique single-word name to
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
364 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
365 example. Then, at the \"EDT Key Name:\" prompt, enter \"linedel\",
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
366 followed by a press of the RETURN key. Finally, when prompted,
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
367 press the \"Line Del\" key. You now will be able to bind functions
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
368 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
369 you can customize bindings of the standard LK-201 keys.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
370
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
371 When you have no additional function keys to specify, just press
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
372 RETURN at the \"EDT Key Name:\" prompt. (If you change your mind
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
373 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
374 \"Press\" prompt, you may omit the key by simply pressing RETURN at
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
375 the prompt.)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
376 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
377 (switch-to-buffer "Directions")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
378 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
379 ;;; Add support for extras keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
380 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
381 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
382 (insert "\
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
383 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
384 ;; Extra Keys
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
385 ;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
386 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
387 (setq EDT-key-name "")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
388 (while (not
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
389 (string-equal (setq EDT-key-name (read-string "EDT Key Name: ")) ""))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
390 (edt-map-key EDT-key-name ""))
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 ; No more keys to add, so wrap up.
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
394 ;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
395 (set-buffer "Keys")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
396 (insert "\
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
397 )
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
398 )
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
399 ")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
400
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
401 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
402 ;;; Save the key mapping program and blow this pop stand
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
403 ;;;
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
404 (let ((file (if edt-lucid-emacs19-p "~/.edt-lucid-keys" "~/.edt-gnu-keys")))
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
405 (set-visited-file-name
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
406 (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
407 (save-buffer)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
408
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
409 (message "That's it! Press any key to exit")
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
410 (sit-for 600)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
411 (kill-emacs t)
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
412
d41e77a56fd9 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
413 ;;; edt-mapper.el ends here