Commit Graph

140 Commits

Author SHA1 Message Date
Rémi Bernon 4bec69b104 user32: Move (Un)LoadKeyboardLayoutW from winex11.drv to user32.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Rémi Bernon 512112ebd5 user32: Set keyboard layout preload key on init.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 20:00:42 +02:00
Rémi Bernon c4e6d16271 user32: Factor GetKeyboardLayoutNameW implementations.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 19:50:40 +02:00
Rémi Bernon e2aa30f21d user32: Factor GetKeyboardLayout and remove driver call.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:57:53 +02:00
Rémi Bernon da9fc41814 user32: Factor ActivateKeyboardLayout previous layout logic.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:57:04 +02:00
Rémi Bernon f044f401f7 user32: Factor unsupported cases into ActivateKeyboardLayout.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 21:08:23 +02:00
Rémi Bernon 123c17aa92 user32: Add RAWINPUT parameter to __wine_send_input.
And send_hardware_message.

This makes it possible to use __wine_send_input to send extended input
data, such as HID device notifications and WM_INPUT messages carrying
HID reports.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50506
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:37:52 +02:00
Rémi Bernon 6444e4fade server: Remove tid from set_key_state request.
As it is always set to GetCurrentThreadId().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 22:51:50 +02:00
Rémi Bernon 626870abe2 server: Remove tid from get_key_state request.
And replace it with an async param if we want the global async keystate.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26269
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27238
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31899
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35907
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-02 22:51:21 +02:00
Derek Lesho bc02e8551f winex11: Set the scan code prefix when necessary.
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Zebediah Figura 1bc9c4fdb2 winex11: Update the state of all keys on KeymapNotify.
The Binding of Isaac transitions in and out of fullscreen when the "F" key is
pressed. Specifically, it will swap states when receiving WM_KEYDOWN,
provided that the previous key state was not pressed (i.e. bit 30 is 0).
However, as part of the process of transitioning, it hides and shows its
window, causing it to temporarily lose focus. If the F key is released while
the window does not have focus, Wine misses this fact, and thinks that the
key was already pressed the next time it is pressed, causing the game to
refuse to change focus. Windows will not deliver WM_KEYUP messages to a
window that does not have focus, but it will always report the true previous
state of any key on the keyboard when requested.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:52 +02:00
Zebediah Figura 178d2c5768 winex11: Remove redundant calls to update_key_state().
These will not actually do anything, and were probably added by mistake,
after the similar calls to VK_CONTROL et al. above.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:52 +02:00
Piotr Caban b8f0a28e8c winex11.drv: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 20:27:57 +02:00
Jacek Caban cbc657a244 winex11.drv: Force changing lock keys state if hooks blocked keyboard input processing.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 15:51:21 +02:00
Akihiro Sagawa 8743188f5d winex11: Fix Japanese 106 keyboard scan/vkey code tables.
Otherwise, some symbol keys (e.g. backslash) map differently.
As a result, jp106's scan code and vkey tables equal to macjp.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-17 16:51:02 +02:00
Alex Henrie 5c06eba58e winex11: Escape non-UTF-8 characters in string literals.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-04 21:46:59 +01:00
Akihiro Sagawa 08b531ed0d winex11: Add Japanese special key support.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-01 20:32:56 +01:00
Akihiro Sagawa ce7a98e95c winex11: Return more reliable value from X11DRV_MsgWaitForMultipleObjects.
After processing several X events, X11DRV_MsgWaitForMultipleObjects always
tells us that a new message is available. This is not true for some cases.

For instance, when we call DestroyWindow, the X queues DestroyEvent. Then,
X11DRV_MsgWaitForMultipleObjects handles the event only; none is posted or
sent as hwnd for destroyed window is unavailable. However, the function
states "new message is available" by returning count - 1 value.

This is an issue for CoWaitForMultipleHandles because it expects a new
message in the queue and consumes the message.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-25 22:27:40 +09:00
Nils Kuhnhenn 1def1e2f7f winex11.drv: Return default locale in LoadKeyboardLayout stub instead of 0.
Signed-off-by: Nils Kuhnhenn <kuhnhenn.nils@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-17 13:38:35 +09:00
Hugh McMaster 598d334e73 winex11.drv: Ctrl-Space should generate space, not 0.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-01 21:09:56 +09:00
Gerald Pfeifer 2b42ddf68a winex11: Make a constant unsigned to avoid shift overflow in get_locale_kbd_layout. 2015-09-02 18:33:46 +09:00
Dmitry Timoshkov a02c3ae759 winex11.drv: On KeymapNotify event also sychronize WinKey state. 2015-07-14 14:40:59 +09:00
Huw Davies 10556c25e4 winex11: Fix ctrl-<symbol> to generate codes below 0x20 where necessary. 2015-05-28 22:44:11 +09:00
Francois Gouget 3adc91f3fc winex11.drv: Remove unneeded NONAMELESSXXX directives. 2015-04-01 14:13:09 +09:00
Alexandre Julliard 710858abee winex11: Remove the no longer needed GetAsyncKeyState entry point. 2012-10-15 15:25:01 +02:00
Alexandre Julliard 03d377eae7 winex11: Release the keyboard lock before sending input to the server. 2012-08-17 10:06:41 +02:00
Alexandre Julliard 26fb3d4a69 winex11: Add a critical section to protect the keyboard mapping tables. 2012-08-16 16:43:19 +02:00
Alexandre Julliard 6bfcb347bf winex11: Remove X11 locking around simple X calls. 2012-08-14 15:13:08 +02:00
Ken Thomases 51d5a48c37 winex11: Fix correspondence between main_key_LT_B and main_key_vkey_qwerty. 2012-06-12 10:27:24 +02:00
Ken Thomases 43984f355a winex11: Be more conservative when matching keys from built-in layout tables. 2012-06-01 14:29:12 +02:00
Alexandre Julliard c8a22a4d1f winex11: Use XGetKeyboardMapping instead of XKeycodeToKeysym. 2012-06-01 14:29:02 +02:00
Dmitry Timoshkov 8ed11d8bb1 winex11.drv: Use XK_KP_Decimal as a fallback if XK_KP_Separator doesn't work. 2012-05-08 09:43:45 +02:00
Dmitry Timoshkov bdae6d7dc0 winex11.drv: Windows always generates VK_DECIMAL for Del/. on a keypad. 2012-04-24 19:12:32 +02:00
Alexandre Julliard f87191815d user32: Fix GetKeyNameText returned length. 2012-02-15 12:07:34 +01:00
Alexandre Julliard 36c76dcc24 winex11: Update only the key state on KeymapNotify without sending fake key events. 2012-02-02 17:19:34 +01:00
Aric Stewart f624876d3e winex11: Strip the _L or _R from X11DRV_GetKeyNameText when appropriate. 2012-01-23 17:05:11 +01:00
Ken Thomases 3fa4da76ea winex11: Have ToUnicodeEx null-terminate the output buffer, if there's room. 2011-12-20 10:15:16 +01:00
Andrew Talbot 53a8746dcd winex11.drv: Mark some fall-throughs in switch statements. 2011-10-18 15:11:12 +02:00
Francois Gouget 076f678446 winex11: Fix printing NULL strings. 2011-09-20 16:21:39 +02:00
Frédéric Delanoy 7e309601f3 dlls: Assorted spelling fixes. 2011-08-03 14:15:50 +02:00
Ken Thomases ebebee5b9e winex11.drv: Map Meta keys to VK_{L, R}MENU, not just VK_MENU.
This fixes a problem with X11DRV_KeymapNotify sending incorrect key-up events.
2011-07-13 15:00:10 +02:00
Ken Thomases c4daf28186 winex11.drv: Fix X11DRV_KeymapNotify when multiple keycodes map to same vkey. 2011-07-13 15:00:00 +02:00
Dmitry Timoshkov f339b6c0f1 winex11.drv: Make sure that all relevant keyboard traces are printed in the same debug channel. 2011-04-20 16:34:25 +02:00
Alexandre Julliard f46bd50a80 winex11: Get rid of the ClipCursor and SendInput entry points. 2011-03-03 17:34:53 +01:00
Alexandre Julliard f1a3480068 user32: Handle input injected through SendInput entirely in user32. 2011-03-02 21:48:39 +01:00
Alexandre Julliard c7efa293f0 server: Invoke low-level hardware hooks directly from the server side. 2011-03-02 21:26:13 +01:00
Alexandre Julliard ae895a1f10 user32: Export a Wine-specific function to send hardware input from the graphics driver. 2011-03-02 21:25:43 +01:00
Alexandre Julliard 731f5b0b7b winex11: Fetch the key state from the server when adjusting state on KeymapNotify and key events. 2011-03-02 12:24:32 +01:00
Alexandre Julliard 02e30f5f77 server: Pass the original hardware input data to the server and set the message parameters on the server side. 2011-03-02 11:34:15 +01:00
Alexandre Julliard bc4afb0786 server: Don't pass a thread id to send_hardware_message, determine it from the window. 2011-03-01 13:21:58 +01:00