annotate lisp/term/lk201.el @ 109418:6e96aca307a4

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 27 Jun 2010 22:48:36 +0000
parents d3c6c7427cef
children 4bc33ffdda1a ef719132ddfa
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
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
4 (defvar lk201-function-map (make-sparse-keymap)
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
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
7 ;; Termcap or terminfo should set these.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
8 ;; (define-key lk201-function-map "\e[A" [up])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
9 ;; (define-key lk201-function-map "\e[B" [down])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
10 ;; (define-key lk201-function-map "\e[C" [right])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
11 ;; (define-key lk201-function-map "\e[D" [left])
83316
102194c6d773 Update Lisp code for a terminal-local `function-key-map'.
Karoly Lorentey <lorentey@elte.hu>
parents: 83305
diff changeset
12
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
13 (define-key lk201-function-map "\e[1~" [find])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
14 (define-key lk201-function-map "\e[2~" [insert])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
15 (define-key lk201-function-map "\e[3~" [delete])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
16 (define-key lk201-function-map "\e[4~" [select])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
17 (define-key lk201-function-map "\e[5~" [prior])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
18 (define-key lk201-function-map "\e[6~" [next])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
19 (define-key lk201-function-map "\e[11~" [f1])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
20 (define-key lk201-function-map "\e[12~" [f2])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
21 (define-key lk201-function-map "\e[13~" [f3])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
22 (define-key lk201-function-map "\e[14~" [f4])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
23 (define-key lk201-function-map "\e[15~" [f5])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
24 (define-key lk201-function-map "\e[17~" [f6])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
25 (define-key lk201-function-map "\e[18~" [f7])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
26 (define-key lk201-function-map "\e[19~" [f8])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
27 (define-key lk201-function-map "\e[20~" [f9])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
28 (define-key lk201-function-map "\e[21~" [f10])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
29 ;; Customarily F11 is used as the ESC key.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
30 ;; The file that includes this one, takes care of that.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
31 (define-key lk201-function-map "\e[23~" [f11])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
32 (define-key lk201-function-map "\e[24~" [f12])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
33 (define-key lk201-function-map "\e[25~" [f13])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
34 (define-key lk201-function-map "\e[26~" [f14])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
35 (define-key lk201-function-map "\e[28~" [help])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
36 (define-key lk201-function-map "\e[29~" [menu])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
37 (define-key lk201-function-map "\e[31~" [f17])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
38 (define-key lk201-function-map "\e[32~" [f18])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
39 (define-key lk201-function-map "\e[33~" [f19])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
40 (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
41
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
42 ;; Termcap or terminfo should set these.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
43 ;; (define-key lk201-function-map "\eOA" [up])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
44 ;; (define-key lk201-function-map "\eOB" [down])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
45 ;; (define-key lk201-function-map "\eOC" [right])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
46 ;; (define-key lk201-function-map "\eOD" [left])
4206
9d2ef5f2ff83 *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3285
diff changeset
47
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
48 ;; Termcap or terminfo should set these, but doesn't properly.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
49 ;; Termcap sets these to k1-k4, which get mapped to f1-f4 in term.c
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
50 (define-key lk201-function-map "\eOP" [kp-f1])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
51 (define-key lk201-function-map "\eOQ" [kp-f2])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
52 (define-key lk201-function-map "\eOR" [kp-f3])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
53 (define-key lk201-function-map "\eOS" [kp-f4])
3285
46b067e1652d *** empty log message ***
Richard M. Stallman <rms@gnu.org>
parents: 3251
diff changeset
54
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
55 (define-key lk201-function-map "\eOI" [kp-tab])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
56 (define-key lk201-function-map "\eOj" [kp-multiply])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
57 (define-key lk201-function-map "\eOk" [kp-add])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
58 (define-key lk201-function-map "\eOl" [kp-separator])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
59 (define-key lk201-function-map "\eOM" [kp-enter])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
60 (define-key lk201-function-map "\eOm" [kp-subtract])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
61 (define-key lk201-function-map "\eOn" [kp-decimal])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
62 (define-key lk201-function-map "\eOo" [kp-divide])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
63 (define-key lk201-function-map "\eOp" [kp-0])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
64 (define-key lk201-function-map "\eOq" [kp-1])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
65 (define-key lk201-function-map "\eOr" [kp-2])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
66 (define-key lk201-function-map "\eOs" [kp-3])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
67 (define-key lk201-function-map "\eOt" [kp-4])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
68 (define-key lk201-function-map "\eOu" [kp-5])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
69 (define-key lk201-function-map "\eOv" [kp-6])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
70 (define-key lk201-function-map "\eOw" [kp-7])
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
71 (define-key lk201-function-map "\eOx" [kp-8])
83526
f441150d61fa Fix syntax errors in terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83524
diff changeset
72 (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
73
83353
532e0a9335a9 Merged in changes from CVS trunk. Plus added lisp/term tweaks.
Karoly Lorentey <lorentey@elte.hu>
parents: 83346
diff changeset
74 (defun terminal-init-lk201 ()
83524
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
75 ;; Use inheritance to let the main keymap override these defaults.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
76 ;; This way we don't override terminfo-derived settings or settings
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
77 ;; made in the .emacs file.
673d62ad74b5 Fix and/or simplify terminal initialization files.
Karoly Lorentey <lorentey@elte.hu>
parents: 83394
diff changeset
78 (let ((m (copy-keymap lk201-function-map)))
85546
d3c6c7427cef * term/news.el (terminal-init-news):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83526
diff changeset
79 (set-keymap-parent m (keymap-parent input-decode-map))
d3c6c7427cef * term/news.el (terminal-init-news):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83526
diff changeset
80 (set-keymap-parent input-decode-map m)))
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 6775
diff changeset
81
85546
d3c6c7427cef * term/news.el (terminal-init-news):
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 83526
diff changeset
82 ;; 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
83 ;;; lk201.el ends here