home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / emacs / 2947 < prev    next >
Encoding:
Text File  |  1992-08-26  |  2.5 KB  |  57 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!ftpbox!motsrd!mothost!white!glas!motcid!stephen
  3. From: stephen@glas.rtsg.mot.com (Stephen Shortland)
  4. Subject: Re: Sun arrow keys with meta and control?
  5. In-Reply-To: griffith@harris.earley.sns.neuphilologie.uni-tuebingen's message of Tue, 25 Aug 1992 18: 15:34 GMT
  6. Message-ID: <1992Aug26.082622.6223@glas.rtsg.mot.com>
  7. Sender: news@glas.rtsg.mot.com
  8. Nntp-Posting-Host: dearg21
  9. Organization: Motorola CIG, Cork, IRELAND
  10. References: <GRIFFITH.92Aug25201534@harris.earley.sns.neuphilologie.uni-tuebingen>
  11. Distribution: comp
  12. Date: Wed, 26 Aug 1992 09:26:15 GMT
  13. Lines: 42
  14.  
  15. In article <GRIFFITH.92Aug25201534@harris.earley.sns.neuphilologie.uni-tuebingen> griffith@harris.earley.sns.neuphilologie.uni-tuebingen (John Griffith) writes:
  16.  
  17. > I asked this question a couple weeks ago but got no response
  18. > so I'll try it once again before giving up.  I know how to
  19. > rebind the Sun function keys (including arrows) to whatever function
  20. > I want.  What I would like to do but have been unable to figure out is
  21. > how to bind meta-up-arrow to something different than plain up-arrow.
  22. > Is this possible?  It seems that meta-up-arrow and up-arrow and control-
  23. > up-arrow all put out the same key code as far as emacs is concerned.
  24. > Any ideas?
  25.  
  26. I just carried out some tests, and it seems that you are right -
  27. control, meta and plain arrow keys produce the same key sequence.
  28. Somebody else may know how to change this. 
  29.  
  30. However shift arrow produces a different set of key sequences -
  31. perhaps you knew this already, if not then you could use it. Below is
  32. a useful functinon which I picked up from the net some time ago. It
  33. lets you see the key sequences produced when different key
  34. combinations are types. Try it out with plain and shifted arrow keys.
  35.  
  36. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  37. ;; original by merlyn -- LastEditDate = "Mon Apr 10 15:45:46 1989"
  38. ;;
  39. (defun see-chars ()
  40.   "Displays characters typed, terminated by a 3-second timeout."
  41.   (interactive)
  42.   (let ((chars "")
  43.     (inhibit-quit t))
  44.     (message "Enter characters, terminated by 3-second timeout...")
  45.     (while (not (sit-for 3))
  46.       (setq chars (concat chars (list (read-char)))
  47.         quit-flag nil))        ; quit-flag maybe set by C-g
  48.     (message "Characters entered: %s" (key-description chars))))
  49.  
  50. --
  51. | Stephen Shortland,      | Motorola Ireland Ltd,    |                      |
  52. |                         | Mahon Industrial Estate, | stephen@             |
  53. | Phone +353-21-357101    | Blackrock, Cork,         |    glas.rtsg.mot.com |
  54. | Fax.  +353-21-357635    | IRELAND.                 |                      |
  55.