wine cvs notes and proposed keyboard detection fix.

Shane Shields locutusenterprises at
Wed Jan 21 16:16:14 CST 2004

On Wednesday 21 January 2004 9:03 am, you wrote:
> > I have done that and piped the output to a logfile. Attached is an
> > abbreviated version with just the icelandic and turkish detection
> > included. It seems to be mismatching on detecting the third keysym where
> > the key is defined in /etc/X11/xkb/symbols/tr this could be a clue :)
> 15 mismatches per layout is too much. Isn't it?

I dont know, is it? :) I would have thought that for a turkish keyboard (or 
any language and the appropriate definition for that matter) should have no 
mismatches. It is even stranger that a different layout gets a higher score 
and gets chosen instead. Eg. For a Turkish keyboard.

trace:keyboard:X11DRV_KEYBOARD_DetectLayout Attempting to match against 
"Icelandic keyboard layout"
trace:keyboard:X11DRV_KEYBOARD_DetectLayout matches=39, mismatches=9, seq=36, 

trace:keyboard:X11DRV_KEYBOARD_DetectLayout Attempting to match against 
"Turkish keyboard layout"
trace:keyboard:X11DRV_KEYBOARD_DetectLayout matches=33, mismatches=15, seq=33, 

Thats what I would like to fix if noone wants to. I just need to make sure I 
understand the code properly. As you know I supplied a patch that produced 
the correct result whereas you said.

"The patch is wrong, since it cures just a symptom not the problem itself.
There are two problems with current x11drv keyboard code:
1. Very likely that Turkish keyboard layout there is incorrect.
2. As stated before the keyboard code should be fixed to take into account
the real keyboard layout while building the keyc2vkey map, not the hardcoded

I have verified that (No. 1) the Turkish keyboard layout is correct so I am 
now trying to work on No. 2.

> >           TRACE_(key)("mismatch for keysym 0x%04lX, keycode %d,
> >
> > in function X11DRV_KEYBOARD_DetectLayout where it should be
> >
> >          TRACE_(key)("mismatch for keysym 0x%08lX, keycode %d,
> 0x%04lX doesn't mean a truncation to 4 characters in format.

I just checked my books and I confused C's  printf and C++'s stream 
formatting. I should sleep more and get more CCCCC's :).

> >
> >                 ckey[i] = keysym & 0xFF;
> This piece of code gets executed only if XKB is disabled or couldn't
> translate keysym to a character.

And according to the piped output it is not going there either so I am at a 
loss for the moment. What I have been doing so far is compiling cvs as an rpm 
and installing it that way. Is it possible to compile and test without 
actually installing wine? And when a change is made to just compile and link 
the relevent section? At the moment whenever I want to test something it is a 
two hour compile and install just to check a two minute change. I also want to 
be able to step through the code too.
Shane Shields

Registered LFS Compiler: 7582
To drink the WINE of success you must first seek the sayings of source

Anyone sending unwanted advertising e-mail to this address will be
charged $25 for network traffic and computing time. By extracting my
address from this message or its header, you agree to these terms.

More information about the wine-devel mailing list