Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!uunet!mcsun!ukc!ox-prg!bush From: bush@ecs.ox.ac.uk (Mark Bush) Newsgroups: comp.emacs Subject: Re: Binding keys Message-ID: <1282@culhua.prg.ox.ac.uk> Date: 14 Feb 91 18:04:27 GMT References: <1278@culhua.prg.ox.ac.uk> Sender: news@prg.ox.ac.uk Organization: Oxford University Computing Laboratory Lines: 39 In article <1278@culhua.prg.ox.ac.uk> ajs@prg.ox.ac.uk (Adolfo Socorro) writes: >Can anybody tell me how to bind the keys of my Sun workstation? I've done this >on other machines, but on the Suns I get some strange behaviour. I'm >especially interested in the R1..R15 keys. I use emacs as little as possible (I much prefer Jove) but, when I do, I have the following in my .emacs file. The bindings for moving up/down one line and backwards/forwards one character should work on most terminals (not just Suns). From this, it should be fairly obvious how to proceed for the other function keys. Mark ---------------------------------- (global-unset-key "\M-[") (define-key global-map "\M-[A" 'previous-line) ;; up-arrow (R8) (define-key global-map "\M-[B" 'next-line) ;; down-arrow (R14) (define-key global-map "\M-[D" 'backward-char) ;; left-arrow (R10) (define-key global-map "\M-[C" 'forward-char) ;; right-arrow (R12) (define-key global-map "\M-OA" 'previous-line) ;; R8 (define-key global-map "\M-OB" 'next-line) ;; R14 (define-key global-map "\M-OD" 'backward-char) ;; R10 (define-key global-map "\M-OC" 'forward-char) ;; R12 (define-key global-map "\M-[215z" 'previous-line);; R8 (define-key global-map "\M-[221z" 'next-line) ;; R14 (define-key global-map "\M-[217z" 'backward-char);; R10 (define-key global-map "\M-[219z" 'forward-char) ;; R12 (define-key global-map "\M-[222z" 'set-mark-command) ;; R15 (define-key global-map "\M-[210z" 'undo) ;; R3 (define-key global-map "\M-[211z" 'beginning-of-line) ;; R4 (define-key global-map "\M-[212z" 'end-of-line) ;; R5 (define-key global-map "\M-[213z" 'other-window) ;; R6 (define-key global-map "\M-[214z" 'backward-word) ;; R7 (define-key global-map "\M-[216z" 'forward-word) ;; R9 (define-key global-map "\M-[220z" 'find-file) ;; R13 (define-key global-map "\M-[208z" 'beginning-of-buffer) ;; R1 (define-key global-map "\M-[209z" 'end-of-buffer) ;; R2 (define-key global-map "\M-[218z" 'switch-to-buffer) ;; R11