home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / emacs / 3039 < prev    next >
Encoding:
Text File  |  1992-09-07  |  3.5 KB  |  80 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!math.fu-berlin.de!pbinfo!joost
  3. From: joost@cadlab.de (Michael Joosten)
  4. Subject: Re: setting up function key for X windows Gnu emacs?
  5. In-Reply-To: pd@x.co.uk's message of 4 Sep 92 12:10:57 GMT
  6. Message-ID: <JOOST.92Sep5170428@ori.cadlab.de>
  7. Sender: news@uni-paderborn.de (News Uni-Paderborn)
  8. Nntp-Posting-Host: ori.cadlab.uni-paderborn.de
  9. Reply-To: joost@cadlab.uni-paderborn.de
  10. Organization: CADLAB, Paderborn, FRG
  11. References: <1992Sep1.222158.7993@ccu1.aukuni.ac.nz> <HARDY.92Sep1214404@golem.ps.uci.edu>
  12.     <ALANB.92Sep2114728@sdlhpp2.sdl.mdcbbs.com>
  13.     <PD.92Sep4121057@herts.x.co.uk>
  14. Date: Sat, 5 Sep 1992 16:04:28 GMT
  15. Lines: 63
  16.  
  17. In article <PD.92Sep4121057@herts.x.co.uk> pd@x.co.uk (Paul Davey) writes:
  18.  
  19.    What would be useful would be a display (type) dependant mapping, so
  20.    that you can have different bindings for function keys on different
  21.    displays.
  22.  
  23.    Then bindings could be specified in a directory of .el files called
  24.    lisp/display (cf lisp/term).
  25.  
  26.    We might have
  27.  
  28.            ncd.el
  29.            sunk4.el
  30.            sunk3.el
  31.            hp.el
  32.    etc.
  33.  
  34.    A local database could map display name to display type.
  35.  
  36.    Maybe V19 has something like this?
  37.  
  38. A few weeks ago I made some experiments in order to achieve that automatic
  39. function key mapping. I'm currently using emacs-18.58 (hacked with epoch's
  40. rebind-key), epoch-4.0 and Lucid Emacs 19.2.
  41.  
  42. The big show-stopper is that X11 doesn't reveal you the sort of keyboard your
  43. machine has. Sure, you could query the vendor-string in the Display structure,
  44. but that doesn't give you much if you're using a plain MIT server (as wee do
  45. it on Suns and Apollo DNs). The only way I think is to have a server-specific
  46. .xsession or .xinitrc, which loads a special resource via xrdb in the server's
  47. database. (say: *KeyboardType: Sun4)  Then you could query the 'rdb' in Lucid-Emacs
  48. (x-get-resource "keyboardType" "KeyboardType" 'string) or epoch (epoch::get-default
  49. "KeyboardType"). Since plain emacs-18 has no way to extract X11 resources in
  50. EmacsLisp, you would have to hack 'just another trick' in the sources. All
  51. pretty nasty and unelegant....
  52.  
  53. I posted this idea on help-lucid-emacs, and the answer I got from Jamie
  54. Zawinski (one of Lucid's emacs hackers and author of a program called
  55. "xkeycaps" that tries to "guess" what keyboard you have (it's a front-end for
  56. xmodmap and really nice, too)) showed his opinion about the whole keyboard
  57. concept of X11: "Add this to the list of Really Stupid Things that X Left
  58. Out." plus a few further comments about the misdesign of
  59. keycode/keysym/modifier, the confusion about function key names in MIT's X11R4/5
  60. and the vendors (Sun,HP,DEC) and so on.
  61.  
  62. Sad, but true: There seems to be no good/easy way to have an automatic
  63. mapping. But, of course, I would like to hear if anybody has found a better
  64. way..
  65.  
  66. Michael
  67.  
  68.  
  69.  
  70. --
  71.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72. | Michael Joosten   |       Tel.  : (+49) (+) 5251-284 120                 |
  73. | CADLAB            |       Fax   : (+49) (+) 5251-284 140                 |
  74. | Bahnhofstr. 32    |       E-Mail: joost@cadlab.de                        |
  75. | D-4790 Paderborn  |                ...!uunet!unido!cadlab!joost           | 
  76. | FRG               | Mass mail to: joost@pbinfo.uni-paderborn.de          |
  77. |--------------------------------------------------------------------------|
  78. | CADLAB is a cooperation between Uni-GH Paderborn & SNI AG                |
  79.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.