home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!mcsun!sun4nl!rulway.LeidenUniv.nl!elc2!rekers
- From: rekers@elc2 (Jan Rekers)
- Subject: Re: emacs key bindings for the keypad
- Message-ID: <1992Dec14.083428.7763@rulway.LeidenUniv.nl>
- Sender: rekers@rulwi.leidenuniv.nl (Jan Rekers)
- Nntp-Posting-Host: rulwielc2.leidenuniv.nl
- Organization: Dept of Mathematics and Computer Science, Leiden University
- References: <19735@sunfse.ese.lmsc.lockheed.com>
- Date: Mon, 14 Dec 92 08:34:28 GMT
- Lines: 27
-
- In article <19735@sunfse.ese.lmsc.lockheed.com> page@leadse5.UUCP (Dan Page) writes:
- >I have been trying furiously to map the keypad of my X terminal to
- >emacs functions....
-
- I use the following code to bind de function keys of my sun:
-
- (global-set-key "\e[" nil)
- (global-set-key "\e[214z" 'beginning-of-buffer) ; Home (keypad 7)
- (global-set-key "\e[216z" 'scroll-down) ; PgUp (keypad 9)
- (global-set-key "\e[220z" 'end-of-buffer) ; End (keypad 1)
- (global-set-key "\e[222z" 'scroll-up) ; PgDn (keypad 3)
- (global-set-key "\eOA" 'previous-line) ; (keypad 8)
- (global-set-key "\eOD" 'backward-char) ; (keypad 4)
- (global-set-key "\eOC" 'forward-char) ; (keypad 6)
- (global-set-key "\eOB" 'next-line) ; (keypad 3)
-
- (global-set-key "\e[224z" 'replace-string) ; F1
- (global-set-key "\e[225z" 'replace-regexp) ; F2
- (global-set-key "\e[226z" 'query-replace) ; F3
- (global-set-key "\e[227z" 'query-replace-regexp) ; F4
-
- I found the keycodes to use by first pressing ^Q and next the key to bind.
- Hope this also works for you!
- --
- J. Rekers, Department of Computer Science, Leiden University
- P.O. box 9512, 2300 RA Leiden, the Netherlands
- email: rekers@rulwi.LeidenUniv.nl, Phone: +31 71 277092, Fax: +31 71 276985
-