[comp.sys.sun] GNU Emacs arrow key binding solution

cm26+@andrew.cmu.edu (Curt McDowell) (10/27/90)

The following works for me.  Try adding it to your .emacs.  Note: you must
give up "esc-[" which is normally backward-paragraph.

; Make Sun and RT arrow keys work

(defvar esc-bracket-map (make-sparse-keymap)
         "*Keymap for ESC-[ encoded keyboard")

(progn
  (define-key esc-map "[" esc-bracket-map)	   ; Install esc-bracket-map
  (define-key esc-map "[A" 'previous-line)	   ; R8
  (define-key esc-map "[B" 'next-line)		   ; R14
  (define-key esc-map "[C" 'forward-char)	   ; R12
  (define-key esc-map "[D" 'backward-char)	   ; R10
  (define-key esc-map "[[" 'backward-paragraph))   ; the original esc-[

Curt McDowell
curt@ibm.com