Path: utzoo!attcan!uunet!decwrl!sgi!shinobu!odin!harlie.corp.sgi.com!scotth From: scotth@harlie.corp.sgi.com (Scott Henry) Newsgroups: comp.emacs Subject: Re: Need help with key definitions on a Silicon Graphics personal IRIS Message-ID: <1990Sep12.173346.1767@odin.corp.sgi.com> Date: 12 Sep 90 17:33:46 GMT References: <967@digi.lonestar.org> Sender: news@odin.corp.sgi.com (Net News) Reply-To: scotth@harlie.corp.sgi.com (Scott Henry) Organization: sgi Lines: 67 Here is the keymapping file that I was using (before I changed to epoch, anyway). It's basically a hacked-up version of "term/vt100.el". I named it "term/iris-ansi.el" with a hard link as "term/iris-ansi-net.el". You also need to put a line in your ~/.emacs like: (if (eq window-system 'x) () (setq term-setup-hook '(lambda nil (enable-arrow-keys)))) You can do similar things for other terminals not in the normal distribution. Just make the file name term/${TERM}.el and things should work just fine. ;;; term/iris-ansi.el ;; Map Iris 4D function key escape sequences from a wsh ;; into the standard slots in function-keymap. ;; This is just a hacked-up version of vt100.el so as to use the 4D ;; keyboard escape sequences (and some added keys). ;; Look at keypad.el for the meaning of the codes. ;; This software is in the public domain. ;; Hacker: Scott Henry (require 'keypad) (defvar Iris-CSI-map nil "The Iris-CSI-map maps the CSI function keys on the Iris 4D keyboard. The CSI keys are the arrow keys.") (if (not Iris-CSI-map) (progn (setq Iris-CSI-map (lookup-key global-map "\e[")) (if (not (keymapp Iris-CSI-map)) (setq Iris-CSI-map (make-sparse-keymap))) ;; [ commands (setup-terminal-keymap Iris-CSI-map '(("A" . ?u) ; up arrow ("B" . ?d) ; down-arrow ("C" . ?r) ; right-arrow ("D" . ?l) ; left-arrow ("H" . ?h) ; home key ("161q" . ?P) ; shift up arrow ("164q" . ?N) ; shift down arrow ("158q" . ?1) ; shift left arrow ("167q" . ?3) ; shift right arrow ("150q" . ?P) ; page up key ("154q" . ?N) ; page down key ("159q" . ?\C-a) ; control left arrow ("168q" . ?\C-b) ; control right arrow ("139q" . ?0) ; insert key ("162q" . ?7) ; control up arrow ("165q" . ?9) ; control down arrow ("146q" . ?\C-c) ; end key ("147q" . ?f) ; shift end key ("P" . ?\C-d) ; shift delete ("142q" . ?k) ; control delete ("143q" . ?u) ; shift home ("144q" . ?u) ; control home )))) (defun enable-arrow-keys () "Enable the use of the VT100 arrow keys for cursor motion. Because of the nature of the VT100, this unavoidably breaks the standard Emacs command ESC [; therefore, it is not done by default, but only if you give this command." (interactive) (global-set-key "\e[" Iris-CSI-map)) -- Scott Henry / Traveller on Dragon Wings Information Services, / Help! My disclaimer is missing! Silicon Graphics, Inc / 'Under-achiever and proud of it!' -- Bart Simpson