Why double translation on keydown?

2007-04-05 Thread Shachar Shemesh
Hi all, The current code for keyboard translation goes something like this, if I understood it correctly: * An X11 event arrives with the physical keycode for the key pressed. * Said code is translated into a VKey based on the current keyboard (fair enough) * Keycode is

Re: Why double translation on keydown?

2007-04-05 Thread Dmitry Timoshkov
Shachar Shemesh [EMAIL PROTECTED] wrote: This process seems, to me, overly long and inefficient. It requires building fairly complex lookup tables for both vkey and Windows keycode. I fail to see what is gained. Why not use the following process instead: * An X11 event arrives * Use the

Re: Why double translation on keydown?

2007-04-05 Thread Shachar Shemesh
Dmitry Timoshkov wrote: X11DRV_ToUnicodeEx is a backend of the Win32 API ToUnicodeEx and it takes a virtual key code. I.e. ToUnicodeEx takes a predefined input and should return data very closely resembling what Windows does. Ok, then maybe we should have TranslateMessage not call that, and use

Re: Why double translation on keydown?

2007-04-05 Thread Dmitry Timoshkov
Shachar Shemesh [EMAIL PROTECTED] wrote: X11DRV_ToUnicodeEx is a backend of the Win32 API ToUnicodeEx and it takes a virtual key code. I.e. ToUnicodeEx takes a predefined input and should return data very closely resembling what Windows does. Ok, then maybe we should have TranslateMessage not