]> code.delx.au - gnu-emacs/blob - lisp/term/xterm.el
b04f03961348547ba9f3b12c5c5ae2ce1fe706d2
[gnu-emacs] / lisp / term / xterm.el
1 ;;; xterm.el --- define function key sequences for xterm
2
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4
5 ;; Author: FSF
6 ;; Keywords: terminals
7
8 ;; This file is part of GNU Emacs.
9
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
24
25 ;;; Commentary:
26
27 ;;; Code:
28
29 (let ((map (make-sparse-keymap)))
30 (define-key map "\e[A" [up])
31 (define-key map "\e[B" [down])
32 (define-key map "\e[C" [right])
33 (define-key map "\e[D" [left])
34 (define-key map "\e[1~" [home])
35 (define-key map "\e[2~" [insert])
36 (define-key map "\e[3~" [delete])
37 (define-key map "\e[4~" [select])
38 (define-key map "\e[5~" [prior])
39 (define-key map "\e[6~" [next])
40 (define-key map "\e[11~" [f1])
41 (define-key map "\e[12~" [f2])
42 (define-key map "\e[13~" [f3])
43 (define-key map "\e[14~" [f4])
44 (define-key map "\e[15~" [f5])
45 (define-key map "\e[17~" [f6])
46 (define-key map "\e[18~" [f7])
47 (define-key map "\e[19~" [f8])
48 (define-key map "\e[20~" [f9])
49 (define-key map "\e[21~" [f10])
50 (define-key map "\e[23~" [f11])
51 (define-key map "\e[24~" [f12])
52 (define-key map "\e[29~" [print])
53
54 (define-key map "\eO5A" [C-up])
55 (define-key map "\eO5B" [C-down])
56 (define-key map "\eO5C" [C-right])
57 (define-key map "\eO5D" [C-left])
58
59 ;; Use inheritance to let the main keymap override those defaults.
60 ;; This way we don't override terminfo-derived settings or settings
61 ;; made in the .emacs file.
62 (set-keymap-parent map (keymap-parent function-key-map))
63 (set-keymap-parent function-key-map map))
64
65 ;;; xterm.el ends here