home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / gnu / emacs / bug / 1569 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.4 KB  |  58 lines

  1. Newsgroups: gnu.emacs.bug
  2. Path: sparky!uunet!usc!sdd.hp.com!cs.utexas.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!titan.ucc.umass.edu!zappo
  3. From: zappo@titan.ucc.umass.edu (Eric Ludlam v 2.1a)
  4. Subject: vt100 arrow keys suggestion
  5. Message-ID: <ZAPPO.92Dec15101005@titan.ucc.umass.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: University Computing Services
  8. Distribution: gnu
  9. Date: Tue, 15 Dec 1992 15:10:05 GMT
  10. Approved: bug-gnu-emacs@prep.ai.mit.edu
  11. Lines: 45
  12.  
  13. Howdy,
  14.  
  15.   I've been doing a fair amount of emacs programming on vt300's and
  16. vt400's over the past few months, and I have the following suggestion
  17. for dealing with the vt100 style arrow keys.  The files vt100.el and
  18. vt200.el both use keypad.el which sets up a "keypad" of letters bound
  19. to functions.  This works great for standard editing where \C-f is
  20. always bound to forward-char.
  21.  
  22.   Now lets say you want to rebind \C-f and company to do movement in a
  23. game, ie move some piece or marker around.  Suddenly the arrow keys
  24. get all confused and move the cursor instead of moving the piece or
  25. marker.  This is annoying.
  26.  
  27.   My suggestion is the following.  Emacs has this way kool ability to
  28. allow you to put a string into a keybinding slot which acts as a
  29. macro.  As a result, I have the following redefinitions in my .emacs
  30. file:
  31.  
  32. (define-key global-map "\e[A" "\C-p")
  33. (define-key global-map "\e[B" "\C-n")
  34. (define-key global-map "\e[C" "\C-f")
  35. (define-key global-map "\e[D" "\C-b")
  36. (define-key global-map "\eOA" "\C-p")
  37. (define-key global-map "\eOB" "\C-n")
  38. (define-key global-map "\eOC" "\C-f")
  39. (define-key global-map "\eOD" "\C-b")
  40.  
  41.   This way, in cases (such as view-mode, dired-mode, games etc, the
  42. arrows are always bound to whatever the \C-f keys are bound to.  In
  43. any professional release, these definitions would be under CSI-map or
  44. somesuch, but the action of using strings makes some modes easier to
  45. deal with.  This, of course, will cause problems when moving to such
  46. emulators as vip or EDT modes, but in general I think this seems kool.
  47.  
  48.   Anyways this is just a suggestion to any who'd care listen.
  49.  
  50.   -Eric
  51. --
  52.  +---------------------------+--------------------------------------------+
  53.  | Eric M. Ludlam            | Student Supervisor of Mainframe Consulting |
  54.  | zappo@titan.ucc.umass.edu |         University Computing Services      |
  55.  | zappo@gnu.ai.mit.edu      |  University of Massachusetts, Amherst MA   |
  56.  +---------------------------+--------------------------------------------+
  57.  
  58.