|
|
1.1 root 1: ;;; Dell 325D (UNIX SVR4) as AT386 UNIX PC keyboard definitions
2: ;;; Based on Brant Cheikes ([email protected], manta!brant)
3: ;;; unixpc.el.
4: ;;;
5: ;;; Mark J. Hewitt ([email protected])
6: ;;; 8-apr-91
7: ;;;
8: ;;; The AT386 keyboard mapping has three types of prefix keys:
9: ;;;
10: ;;; <esc> [ for cursor positioning and keypad
11: ;;; <esc> O for function keys
12: ;;; <esc> N for ALT keys
13: ;;;
14: ;;; *NOTE* Care is required when using ALT bound as a simple META key.
15: ;;; It works for most normal key sequences, but some ALT-CTRL
16: ;;; (aka M-C-x) are intercepted locally. F'rinstance M-C-d would
17: ;;; break to the kernel debugger, kdb (!).
18: ;;;
19:
20: (require 'keypad) ; for keypad-defaults
21:
22: (defvar Dell-map-1 nil
23: "The <esc>O keys (Function) on the Dell Unix PC.")
24: (defvar Dell-map-3 nil
25: "The <esc>[ keys (Right-hand keypads) on the Dell Unix PC.")
26:
27: (defun enable-function-keys ()
28: "Enable the use of the keypad and function keys.
29: Because of the nature of the PC keyboard under Unix,
30: this unavoidably breaks a standard Emacs command (M-[);
31: therefore, it is not done by default, but only if you give this command."
32: (interactive)
33: (global-set-key "\eO" Dell-map-1)
34: (global-set-key "\eN" 'ESC-prefix)
35: (global-set-key "\e[" Dell-map-3)
36: )
37:
38: ;;; Create a few new keypad defaults.
39:
40: (keypad-default "5" 'set-mark-command)
41: (keypad-default "I" 'yank)
42: (keypad-default "x" 'call-last-kbd-macro)
43: (keypad-default "\C-f" 'info)
44: (keypad-default "\C-g" 'overwrite-mode)
45: (keypad-default "\C-h" 'auto-fill-mode)
46: (keypad-default "\C-i" 'abbrev-mode)
47: (keypad-default "\C-j" 'browse-yank)
48: ; There are no definitions for these functions.
49: ;(keypad-default "\C-l" 'Dell-132)
50: ;(keypad-default "\C-m" 'Dell-80)
51: (keypad-default "\C-n" 'scroll-other-window)
52: (keypad-default "\C-o" 'other-window)
53: (keypad-default "\C-p" 'repeat-complex-command)
54:
55: ;; Now populate the maps, if they are enabled.
56:
57: (if Dell-map-1
58: nil
59: (setq Dell-map-1 (make-keymap)) ; <ESC>O (function key) commands
60: (setup-terminal-keymap Dell-map-1
61: '(("P" . ??) ; F1 (help)
62: ("p" . ?\^f) ; Shift F1 (info)
63: ("Q" . ?\^g) ; F2 (overwrite-mode)
64: ("q" . ?\^g) ; Shift F2 (overwrite-mode)
65: ("R" . ?\^h) ; F3 (auto-fill-mode)
66: ("r" . ?\^h) ; Shift F3 (auto-fill-mode)
67: ("S" . ?\^i) ; F4 (abbrev-mode)
68: ("s" . ?\^i) ; Shift F4 (abbrev-mode)
69: ("T" . ?\^j) ; F5 (browse-yank)
70: ("t" . ?\^j) ; Shift F5 (browse-yank)
71: ("U" . ?\^l) ; F6 (Dell-132)
72: ("u" . ?\^m) ; Shift F6 (Dell-80)
73: ("V" . nil) ; F7
74: ("v" . nil) ; Shift F7
75: ("W" . ?\^n) ; F8 (scroll-other-window)
76: ("w" . ?\^o) ; Shift F8 (other-window)
77: ("X" . nil) ; F9
78: ("x" . nil) ; Shift F9
79: ("Y" . nil) ; F10
80: ("y" . nil) ; Shift F10
81: ("Z" . ?\^p) ; F11 (repeat-complex-command)
82: ("z" . ?\^p) ; Shift F11 (repeat-complex-command)
83: ("A" . ?x) ; F12 (call-last-kbd-macro)
84: ("a" . ?x) ; Shift F12 (call-last-kbd-macro)
85: )))
86:
87: (if Dell-map-3
88: nil
89: (setq Dell-map-3 (make-sparse-keymap)) ; <ESC>[ commands
90: (setup-terminal-keymap Dell-map-3
91: '(("A" . ?u) ; Up Arrow (previous-line)
92: ("B" . ?d) ; Down Arrow (next-line)
93: ("C" . ?r) ; Right Arrow (forward-char)
94: ("D" . ?l) ; Left Arrow (backward-char)
95: ("H" . ?\^a) ; Home (beginning-of-line)
96: ("Y" . ?\^b) ; End (end-of-line)
97: ("@" . ?I) ; Insert (yank)
98: ("U" . ?N) ; Page Up (scroll-up)
99: ("V" . ?P) ; Shift-Page (scroll-down)
100: ("G" . ?5) ; pad 5 (set-mark-command)
101: )))
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.