annotate lisp/term/lk201.el @ 83332:6c13700d1c13

Merged from miles@gnu.org--gnu-2005 (patch 469) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-469 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-372
author Karoly Lorentey <lorentey@elte.hu>
date Tue, 05 Jul 2005 22:22:24 +0000
parents 8eafadd7838b
children 7372c2f9daac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
47726
33d53d287ee4 Add "no-byte-compile: t" in first line.
Juanma Barranquero <lekktu@gmail.com>
parents: 38414
diff changeset
1 ;; -*- no-byte-compile: t -*-
3285
46b067e1652d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3251
diff changeset
2 ;; Define function key sequences for DEC terminals.
46b067e1652d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3251
diff changeset
3
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
4 (defvar lk201-function-map nil
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
5 "Function key definitions for DEC terminals.")
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
6
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
7 ;; Make reloads faster.
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
8 (unless lk201-function-map
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
9 (setq lk201-function-map (make-sparse-keymap))
83298
ed09a89e2b25 Fix UTF-8 tty input when first frame is an X frame. Steps towards multiple tty locale support.
Karoly Lorentey <lorentey@elte.hu>
parents: 52401
diff changeset
10
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
11 ;; Termcap or terminfo should set these.
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
12 ;; (define-key lk201-function-map "\e[A" [up])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
13 ;; (define-key lk201-function-map "\e[B" [down])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
14 ;; (define-key lk201-function-map "\e[C" [right])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
15 ;; (define-key lk201-function-map "\e[D" [left])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
16
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
17 (define-key lk201-function-map "\e[1~" [find])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
18 (define-key lk201-function-map "\e[2~" [insert])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
19 (define-key lk201-function-map "\e[3~" [delete])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
20 (define-key lk201-function-map "\e[4~" [select])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
21 (define-key lk201-function-map "\e[5~" [prior])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
22 (define-key lk201-function-map "\e[6~" [next])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
23 (define-key lk201-function-map "\e[11~" [f1])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
24 (define-key lk201-function-map "\e[12~" [f2])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
25 (define-key lk201-function-map "\e[13~" [f3])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
26 (define-key lk201-function-map "\e[14~" [f4])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
27 (define-key lk201-function-map "\e[15~" [f5])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
28 (define-key lk201-function-map "\e[17~" [f6])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
29 (define-key lk201-function-map "\e[18~" [f7])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
30 (define-key lk201-function-map "\e[19~" [f8])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
31 (define-key lk201-function-map "\e[20~" [f9])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
32 (define-key lk201-function-map "\e[21~" [f10])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
33 ;; Customarily F11 is used as the ESC key.
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
34 ;; The file that includes this one, takes care of that.
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
35 (define-key lk201-function-map "\e[23~" [f11])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
36 (define-key lk201-function-map "\e[24~" [f12])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
37 (define-key lk201-function-map "\e[25~" [f13])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
38 (define-key lk201-function-map "\e[26~" [f14])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
39 (define-key lk201-function-map "\e[28~" [help])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
40 (define-key lk201-function-map "\e[29~" [menu])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
41 (define-key lk201-function-map "\e[31~" [f17])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
42 (define-key lk201-function-map "\e[32~" [f18])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
43 (define-key lk201-function-map "\e[33~" [f19])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
44 (define-key lk201-function-map "\e[34~" [f20])
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
45
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
46 ;; Termcap or terminfo should set these.
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
47 ;; (define-key lk201-function-map "\eOA" [up])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
48 ;; (define-key lk201-function-map "\eOB" [down])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
49 ;; (define-key lk201-function-map "\eOC" [right])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
50 ;; (define-key lk201-function-map "\eOD" [left])
4206
9d2ef5f2ff83 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3285
diff changeset
51
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
52 ;; Termcap or terminfo should set these, but doesn't properly.
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
53 ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
54 (define-key lk201-function-map "\eOP" [kp-f1])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
55 (define-key lk201-function-map "\eOQ" [kp-f2])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
56 (define-key lk201-function-map "\eOR" [kp-f3])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
57 (define-key lk201-function-map "\eOS" [kp-f4])
3285
46b067e1652d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3251
diff changeset
58
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
59 (define-key lk201-function-map "\eOI" [kp-tab])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
60 (define-key lk201-function-map "\eOj" [kp-multiply])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
61 (define-key lk201-function-map "\eOk" [kp-add])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
62 (define-key lk201-function-map "\eOl" [kp-separator])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
63 (define-key lk201-function-map "\eOM" [kp-enter])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
64 (define-key lk201-function-map "\eOm" [kp-subtract])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
65 (define-key lk201-function-map "\eOn" [kp-decimal])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
66 (define-key lk201-function-map "\eOo" [kp-divide])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
67 (define-key lk201-function-map "\eOp" [kp-0])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
68 (define-key lk201-function-map "\eOq" [kp-1])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
69 (define-key lk201-function-map "\eOr" [kp-2])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
70 (define-key lk201-function-map "\eOs" [kp-3])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
71 (define-key lk201-function-map "\eOt" [kp-4])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
72 (define-key lk201-function-map "\eOu" [kp-5])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
73 (define-key lk201-function-map "\eOv" [kp-6])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
74 (define-key lk201-function-map "\eOw" [kp-7])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
75 (define-key lk201-function-map "\eOx" [kp-8])
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
76 (define-key lk201-function-map "\eOy" [kp-9]))
83305
80cb3fe96145 Speed up `emacsclient -t' on xterms. (by suggestion of Dan Nicolaescu)
Karoly Lorentey <lorentey@elte.hu>
parents: 83298
diff changeset
77
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
78 ;; Use inheritance to let the main keymap override these defaults.
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
79 ;; This way we don't override terminfo-derived settings or settings
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
80 ;; made in the .emacs file.
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
81 (let ((m (copy-keymap lk201-function-map)))
83326
8eafadd7838b Use terminal-local-value to access function-key-map in terminal packages.
Karoly Lorentey <lorentey@elte.hu>
parents: 83316
diff changeset
82 (set-keymap-parent m (keymap-parent (terminal-local-value 'function-key-map nil)))
8eafadd7838b Use terminal-local-value to access function-key-map in terminal packages.
Karoly Lorentey <lorentey@elte.hu>
parents: 83316
diff changeset
83 (set-keymap-parent (terminal-local-value 'function-key-map nil) m))
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 6775
diff changeset
84
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47726
diff changeset
85 ;;; arch-tag: 7ffb4444-6a23-43e1-b457-43cf4f673c0d
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 6775
diff changeset
86 ;;; lk201.el ends here