Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ukma!xanth!mcnc!ece-csc!ncrcae!ncrlnk!uunet!mcvax!unido!ztivax!tumuc!thsrem From: thsrem@tumuc.UUCP (Thomas Schneider) Newsgroups: comp.windows.x Subject: 2 keycode questions Keywords: keycode modifier Message-ID: <487@tumuc.UUCP> Date: 10 Feb 89 17:36:47 GMT Reply-To: thsrem@tumuc.UUCP (Thomas Schneider) Organization: Nixdorf Microprocessor Engineering, Berlin Lines: 35 Hi, I am working on an server implementation for Nixdorf. I would like to ask the net the following questions: 1. Why are the keycodes restricted to [8,255] ? Do the reserved 8 codes correspond to the 8 possible modifiers ? Why? How? (It seems there is a typo in O'Reilly's Xlib Program. Manual Page 250: "The keycode ... is a number between 7 and 255"). I have keys which generate 1 and 5. I need to map them into [8,255], right? 2. (more difficult) My Nixdorf keyboard has 3 engravings on some keys. The third engravings ought to be addressed with a separate "modifier". The hard thing is that some ASCII symbols (as [, ], {, }, |, etc.) can only be accessed by this "modifier". My first approach was to change the server code to let the table which maps from keycodes to keysyms have a third column for this "modifier". BUT: xterm doesn't look at this column at all. Thus I am not able to type a "|" in xterm. I could change Xlib to handle this but a SUN xterm connected to my machine would still be broken. The only (ugly) solution I can think of: Make an additional mapping before any other mapping from let's say "physical" keycodes to "virtual" keycodes which would map the code for "|" to a separate "virtual" keycode. My special "modifier" would by hidden to any client and the clients would "see" additional keys for [, ], | etc. Am I missing something? Is there any other way to do it? 3. I learned that the keycode/keysym mapping is server wide. Why is this mapping handled on the client side with all the toubles of SHIFT, LOCK, CONTROL and updating? Why does the protocol not just handle keysyms? Sorry for the long questions. I tried to be as short and clear as possible. Thomas Schneider. UUCP: uunet!unido!tumuc!thsrem