Patch for keyboard handling
Harold L Hunt II
huntharo@msu.edu
Mon Nov 3 14:30:00 GMT 2003
Takuma Murakami wrote:
> I have made a patch to improve keyboard handling.
> Any comments would be appreciated.
>
> The changes are:
>
> 1) win.h, winkeybd.c, winwndproc.c - Improve the
> synchronization of mode key states between XWin
> and Windows.
+ /* Stored to get internal mode key states. Must be read-only. */
+ static unsigned short *g_winInternalModeKeyStatesPtr = NULL;
Shouldn't this be a pointer to constant data? Isn't that:
static unsigned short const * g_winInternalModeKeyStatesPtr = NULL;
???
> 2) winmultiwindowwndproc.c - Enable mode key
> synchronization in -multiwindow mode.
+ g_winInternalModeKeyStatesPtr = &(pDeviceInt->key->state);
Wow! That is a really good idea. I should have been doing that all
along, but I didn't realize that I could access the internal mode-key
states. Great idea.
> 3) winwndproc.c - Make clean termination on
> logoff or shutdown.
Good catch for WM_ENDSESSION. That should have been there all along...
> 4) winconfig.c - Fix the lacks of KEYUP messages in
> Japanese environments. The solution was proposed
> by Kensuke Matsuzaki.
Looks good to me. It all depends on if it works for you guys.
> 5) winwndproc.c - Ignore Windows keyboard auto-repeats
> so that XWin controls auto-repeats instead of Windows.
Okay.
I will try to apply this patch tomorrow.
Thanks for contributing,
Harold
More information about the Cygwin-xfree
mailing list