GNU emacs key remapping

Jeff P. M. Hultquist hultquis at nas.nasa.gov
Fri Aug 10 04:03:31 AEST 1990


>    From: hewey!bnm at rosalyn.dms.cdc.COM (Brad Miller)
>    Newsgroups: comp.sys.sgi
> 
>    I am trying to figure out how to remap the arrow keys so that I
>    can use them with GNU emacs in a wsh window.  The problem seems
>    to be that the sequence for up arrow is \e[A ...

;;;----------------------------------------
;;;  Mappings of the "extra" keys on the IRIS; some of these keys
;;;  do not produce any output.  This is probably due to some
;;;  calls to 'bindkey()' or 'replacekey' in the standard system
;;;  initialization.  The most annoying of these is the aliasing
;;;  of the keypad's (2468) to be indistinguishable from the arrow 
;;;  keys.

(require 'keypad)

(progn
  (defvar IRIS-map (lookup-key global-map "\e["))
  (if (not (keymapp IRIS-map))
      (progn
	(setq IRIS-map (make-sparse-keymap))
	(global-set-key "\e[" IRIS-map)))
  (setup-terminal-keymap 
   IRIS-map
   '(;;
     ("001q" . upcase-word)	; F1
     ("002q" . nil)		; F2
     ; ("003q" . nil)		; F3
     ; ("004q" . nil)		; F4
     ("005q" . nil)		; F5
     ("006q" . nil)		; F6
     ("007q" . nil)		; F7
     ("008q" . nil)		; F8
     ("009q" . nil)		; F9
     ("010q" . nil)		; F10
     ("011q" . nil)		; F11
     ("012q" . nil)		; F12
     ;; 
     ("139q" . nil)		; 0
     ("146q" . nil)		; 1
     ("154q" . nil)		; 3
     ("000q" . nil)		; 5
     ("H" . beginning-of-buffer) ; 7
     ("150q" . nil)		; 9
     ;;
     ;; ("B" . nil)		; 2
     ;; ("D" . nil)		; 4
     ;; ("C" . nil)		; 6
     ;; ("A" . nil)		; 8
     ;;
     ("A" . previous-line)	; up
     ("B" . next-line)		; down
     ("C" . forward-char)	; right
     ("D" . backward-char)	; left
     ;;
     ("139q" . nil)		; insert
     ("209q" . nil)		; print-screen
     ("213q" . nil)		; scroll-lock
     ("217q" . nil)		; pause
     ))
  'done)

;;;----------------------------------------
--
--
Jeff Hultquist				hultquis at nas.nasa.gov
NASA - Ames Research Center		(415) 604-4970
Disclaimer:  "I am not a rocket scientist."



More information about the Comp.sys.sgi mailing list