home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / sun / admin / 10629 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  4.1 KB

  1. Xref: sparky comp.sys.sun.admin:10629 comp.sys.sun.apps:3048 comp.sys.sun.hardware:7019 comp.sys.sun.misc:6420 comp.sys.sun.wanted:2204
  2. Newsgroups: comp.sys.sun.admin,comp.sys.sun.apps,comp.sys.sun.hardware,comp.sys.sun.misc,comp.sys.sun.wanted
  3. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!Germany.EU.net!news.uni-bielefeld.de!asl.uni-bielefeld.de!marvo
  4. From: marvo@asl.uni-bielefeld.de (Markus Vogt)
  5. Subject: Re: Keycode Assignments for use by xmodmap
  6. Sender: news@hermes.hrz.uni-bielefeld.de (News Administrator)
  7. Message-ID: <C18FM9.B6w@hermes.hrz.uni-bielefeld.de>
  8. Date: Fri, 22 Jan 1993 01:46:56 GMT
  9. References:  <C17Dr6.2G4@hermes.hrz.uni-bielefeld.de>
  10. Nntp-Posting-Host: liliasl11.uni-bielefeld.de
  11. Organization: Universitaet Bielefeld, ASL.
  12. Lines: 104
  13.  
  14. In article <C17Dr6.2G4@hermes.hrz.uni-bielefeld.de>, marvo@asl.uni-bielefeld.de (Markus Vogt) writes:
  15. |> Hello,
  16. |> 
  17. |> I have problems in setting up the Sun Type5 keyboard attached to a
  18. |> SPARCstation 10 correctly.
  19. |> 
  20. |> On the console screen (right after the login process) I can use 
  21. |> the grey cursor keys, but when I start XWindows, XWindows seems 
  22. |> to change the keycode assignments.  These keycodes differ from the 
  23. |> codes I found in the 'Sun Type5 Keyboard Product Notes', which 
  24. |> came along with the SPARCstation 10 package.
  25. |> 
  26. |> I won't be able to use the grey cursor keys unless I modify the keymap 
  27. |> using 'xmodmap'.  The file I feed to xmodmap contains the following lines:
  28. |> 
  29. |>   keycode 27 = Up
  30. |>   keycode 31 = Left
  31. |>   keycode 34 = Down
  32. |>   keycode 35 = Right
  33. |> 
  34. |> 
  35. |> Is there a way to have a global keycode assignment instead of having 
  36. |> each user include the xmodmap command with his '.xinitrc' file?
  37. |> Or could I prevent XWindows from changing keycode assignments?
  38. |> 
  39. |> I would appreciate any help,
  40. |> 
  41. |> Markus
  42.  
  43.  
  44.  
  45. Hello everybody,
  46.  
  47. I received several hints how to solve the above problem
  48. and I just want to post summary:
  49.  
  50.  
  51. First of all:
  52. ----------------------------------------
  53. The Xsun (Xwindow server) won't recognize that you're using a type5
  54. keyboard unless you apply a certain patch to the server and rebuild it.
  55. The name of the patch package is 'sunkbd.921216.tar.Z'.  It's
  56. available from export.lcs.mit.edu under /contrib, e.g. 
  57.  
  58.  
  59. Second:
  60. ----------------------------------------
  61. If you don't want to rebuild your Xserver, you could use 'xmodmap' to
  62. modify the current keyboard assignments.  
  63.  
  64.  
  65. What I did:
  66. ----------------------------------------
  67. Since we're gonna upgrade to X11R5 within the next few weeks anyway, I
  68. didn't want to get the X11R4 resources again to rebuild the X11R4 xserver.
  69.  
  70. So I edited my global resource file for the Xwindow initialization
  71. process (in my case the file '/vol/local/etc/startup/xinitrc') and 
  72. inserted the following lines:
  73.  
  74.    if [ `arch -k` = "sun4m" ]; then
  75.       xmodmap /vol/local/etc/startup/SS10xmodmap
  76.    fi
  77.  
  78. This would change the keyboard assignments only if you're currently 
  79. using a sun4m kernel architecture, that is SPARCstation 10.  
  80. I included this check, because we have also machines with different
  81. kernel architecures which do *not* use a type5 keyboard and 
  82. therefore do *not* need this modification.
  83.  
  84. The file 'SS10xmodmap' contains my changes in xmodmap syntax as
  85. described in the xmodmap manual or by 'xmodmap -grammar'.
  86.  
  87. Finally I had to make sure that each user had the following line
  88. in his $HOME/.xinitrc file:
  89.  
  90.    . /vol/local/etc/startup/xinitrc
  91.  
  92. This guarantees, that all users get my changes.  At least 
  93. for a while... ;)
  94.  
  95.  
  96. IMPORTANT:
  97. ----------------------------------------
  98. The Xserver does *not* use the same keycodes as shown in the
  99. 'Sun Type5 Keyboard Product Notes', but adds an offset of 7 to
  100. each keycode!
  101. The <space-bar>, for instance, usually has code 121, but the
  102. Xserver uses code 128. 
  103. So, don't forget to add the offset! :-)
  104. ----------------------------------------
  105.  
  106.  
  107. That's it -
  108.  
  109. Thanks again everyone who posted a followup or replied directly,
  110.  
  111.  
  112.  Markus.
  113.  
  114. ------------- Markus Vogt ---------------- University of Bielefeld ------
  115.          System Administration             Room No.    C6-141
  116.       marvo@asl.Uni-Bielefeld.DE or        PO Box      100131
  117. -- uteca008@Unibi.HRZ.Uni-Bielefeld.DE --- W-4800 Bielefeld 1, Germany --
  118.