Module: wine Branch: master Commit: 027f73fcd550d4889971468a24de96d1f14a3b68 URL: https://gitlab.winehq.org/wine/wine/-/commit/027f73fcd550d4889971468a24de96d...
Author: Rémi Bernon rbernon@codeweavers.com Date: Sat Aug 26 14:54:09 2023 +0200
win32u: Force US layout in ToUnicode when CTRL is pressed.
The host layout behave very differently in that case and we have tests that check the exact results.
---
dlls/win32u/input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index f718b274176..ae03f99adc9 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -516,6 +516,11 @@ static WCHAR kbd_tables_vkey_to_wchar( const KBDTABLES *tables, UINT vkey, const
if (ctrl && alt) return WCH_NONE; if (!ctrl && vkey == VK_ESCAPE) return VK_ESCAPE; + if (ctrl && !alt) + { + if (vkey >= 'A' && vkey <= 'Z') return vkey - 'A' + 1; + tables = &kbdus_tables; + }
mod = caps_mod = kbd_tables_get_mod_num( tables, state, FALSE ); if (caps) caps_mod = kbd_tables_get_mod_num( tables, state, TRUE ); @@ -531,7 +536,6 @@ static WCHAR kbd_tables_vkey_to_wchar( const KBDTABLES *tables, UINT vkey, const } }
- if (ctrl && vkey >= 'A' && vkey <= 'Z') return vkey - 'A' + 1; return WCH_NONE; }