Commit 027f73fc authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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.
parent ca02df5c
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment