home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16602 < prev    next >
Encoding:
Internet Message Format  |  1992-09-12  |  6.1 KB

  1. Xref: sparky comp.windows.x:16602 comp.windows.x.apps:1020
  2. Newsgroups: comp.windows.x,comp.windows.x.apps
  3. Path: sparky!uunet!world!bzs
  4. From: bzs@ussr.std.com (Barry Shein)
  5. Subject: Re: Attention Earthlings -- Cross-Vendor X11 Server Mess!
  6. In-Reply-To: mouse@thunder.mcrcim.mcgill.edu's message of Tue, 8 Sep 92 22:02:44 GMT
  7. Message-ID: <BZS.92Sep12205811@ussr.std.com>
  8. Sender: usenet@world.std.com (Mr USENET himself)
  9. Nntp-Posting-Host: ussr.std.com
  10. Organization: The World
  11. References: <BZS.92Aug30043553@ussr.std.com> <BZS.92Sep7182835@ussr.std.com>
  12.     <1992Sep8.220244.792@thunder.mcrcim.mcgill.edu>
  13. Date: Sun, 13 Sep 1992 01:58:11 GMT
  14. Lines: 114
  15.  
  16.  
  17. From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) [responding to me]
  18. >> It's not "do I get a reasonable response when I push this key", it's
  19. >> "can I anticipate what I will get when keys are pressed".
  20. >
  21. >Unless the "I" is different, I don't see much difference.
  22.  
  23. To use an analogy, it's the difference between being able to do an
  24. open() for a file you know exists in some directory versus being able
  25. to ask for every file in a particular directory. You're saying all is
  26. ok because you do an open("foo",...) and indeed foo opens. I'm saying
  27. that I don't want to guess what files are available, I want to do an
  28. opendir() and read off what files are here.
  29.  
  30. To continue, I claim although X11's "open" is fine I guess, if you do
  31. an opendir() (i.e. try to figure out what keysym/keycode/modifiers
  32. exist) it's indeterminate. And, in fact, different vendors'
  33. "filesystems" will give you different answers for what seems to be the
  34. same set of conditions.
  35.  
  36. Look, the problem is very simply demonstrated. Do an 'xmodmap -pk' on
  37. several vendors' X servers around the office or whatever. Notice that
  38. you get varying results for seemingly similar conditions (e.g. some
  39. return XK_a and XK_A, others only have XK_A in the mappings).
  40.  
  41. Now, given that, try to imagine situations where that indeterminancy
  42. might cause applications programming problems. Does the inconsistency
  43. at least make you suspect that perhaps I have a point here that you're
  44. missing? At least use your engineering sense of symmetry, even if the
  45. underlying problem doesn't jump right out at you.
  46.  
  47. Again, back to the file analogy, imagine you used two vendors' unix's.
  48.  
  49. You read a directory that you knew was identical on each machine.
  50.  
  51. And you got back different results, in toto, a different number of
  52. files. Say one returned both foo and FOO while the other returned only
  53. foo.
  54.  
  55. So you point this out to the vendor, and the vendor says oh that's ok
  56. because if you do an open("foo",...) it will do what you expect.
  57.  
  58. So you say yes, you know that open() works ok, but your ls command you
  59. just wrote gives (necessarily) different output for the two different
  60. systems.
  61.  
  62. Following what you're saying above, you're like the vendor and your
  63. answer is ``why would you want to write an ls command? open works
  64. fine'' or some such put off.
  65.  
  66. The difference is which direction the information flows: Enumerate the
  67. set for me vs. tell me if some given item is in the set. I'm saying
  68. you can discover that a particular item is in the set, but enumeration
  69. is inconsistent from vendor to vendor.
  70.  
  71. >> If you're still having trouble with the distinction, imagine that
  72. >> what your application is trying to do is set the XLookupString() for
  73. >> all the possible keysyms (e.g. change the type-in font.)
  74. >
  75. >Hm?  Fonts are a display issue.  All the way from the keyboard through
  76. >the returned values from XLookupString, fonts are completely
  77. >irrelevant.  (I'm also not sure what you mean by "set the
  78. >XLookupString()", especially since "all the possible keysyms" is an
  79. >enormous number; even if you stick to the Consortium-standard ones in
  80. >keysymdef.h, it's still a very large list.)
  81.  
  82. Indeed, but SOMEONE has to finally decide what glyph is displayed in
  83. response to a keypress. SOMEONE has to map these onto each other. And
  84. to map them together you (may) need a determinate list of what
  85. keypresses can occur and even what they usually mean (i.e. their
  86. KeySym) if you want to follow some heuristics for re-assignment.
  87.  
  88. Forget Latin-1, it's too easily mapped to the current standard and
  89. that's one reason you are confused, it all maps rather easily onto
  90. pre-conceived notions of ASCII collating (e.g. XK_a vs XK_A).
  91.  
  92. Imagine a character set where there is a strong convention that XK_FOO
  93. is the shift of XK_GOO, but not in the upper/lower case sense (more in
  94. the arbitrary but strong convention of = and + being shifts.)
  95.  
  96. Given the current use of the standard by vendors you may not be able
  97. to discover (it's hit or miss) that XK_FOO is the shift of XK_GOO.
  98. Only one of them may be in the keymap (e.g. what xmodmap -pk prints
  99. out.) All you will know is that XK_GOO exists, and the shift key can
  100. be pressed, perhaps that is XK_FOO? Maybe not.
  101.  
  102. You're too easily assuming that because a keymap tells you that XK_A
  103. exists that obviously XK_a must be related to it by a shift. That is a
  104. convention of Latin-1. But if you were trying to deal with, I dunno, A
  105. Zapf Dingbats Keyboard from Zapfia it may not be so obvious that the
  106. shift of XK_HAPPYFACE is XK_BULLSEYE. Yet, given current vendors'
  107. standards, some seem to feel that both should be in the keymap, others
  108. think only one of those (oddly, typically the SHIFTED version, not
  109. really oddly because typically that's what shows on the keycap.)
  110.  
  111. All I'm saying is that each piece has its own sort of logic
  112. (engravings, etc) but put it all together and it doesn't really spell
  113. XK_MOTHER, and it's not even treated as a standard by vendors. And
  114. perhaps the current "standard" is the confusion since although logical
  115. it may not be useful, so many vendors go outside the standard to such
  116. a point that an application can't be sure what it will find when
  117. querying the keyboard.
  118.  
  119. You seem to want to keep explaining the way X11 works to me instead of
  120. saying to yourself ``gee, maybe he really does understand the whole
  121. mess and is making a point that doesn't make sense to me because it's
  122. a bit subtle and I should think a little harder before assuming he
  123. doesn't understand it?''
  124.  
  125. --
  126.         -Barry Shein
  127.  
  128. Software Tool & Die    | bzs@world.std.com          | uunet!world!bzs
  129. Purveyors to the Trade | Voice: 617-739-0202        | Login: 617-739-WRLD
  130.