home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / emacs / 3781 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.7 KB  |  40 lines

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