Re: XKB Patch

Peter Åstrand <[email protected]>
Newsgroups gmane.network.rdesktop.devel
Message-ID <[email protected]>
On Sat, 16 May 2009, Marc-André Moreau wrote:

> 3) Once the keycode->virtual key code map is loaded, I use keycodes at run time and map them to virtual key codes,
> then to scan codes. ANY X program receives the keycodes. Look in xwin.c.

Sure, but that doesn't mean that they are usable.


> keycodes alone are unreliable as they are
> hardware dependent, but that was the whole point of using the XKB *database* to map them a consistent naming system
> (XKB key names / virtual key codes).

The problem is just that you are using one mapping at build time (the XKB 
database) but another at runtime (the current Xserver keyboard mapping). 
This means that you cannot trust that the keycodes are the same: They can 
differ in a number of cases: When the used version of the XKB database 
differs, when you are running another platform at runtime (say, Solaris), 
when you move between "normal" and "evdev" systems, if you use Xvnc etc 
etc.

For a normal application, looking at the "keycode" is simply a big no-no.

Using the "keysyms" is the preferred approach; works on all platforms.

Rgds, 
---
Peter Åstrand		ThinLinc Chief Developer
Cendio AB		http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping	Phone: +46-13-21 46 00

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects

_______________________________________________
rdesktop-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.