[Windows, 3.x] Fix WM_CHAR processing code using Unicode char instead of Virtual key.

(cherry picked from commit 77fc88e9a6)
This commit is contained in:
bruvzg 2022-09-23 20:21:52 +03:00 committed by Haoyu Qiu
parent 108e3196ea
commit a0f1eac3e9

View file

@ -1183,7 +1183,7 @@ void OS_Windows::process_key_events() {
k->set_control(ke.control);
k->set_metakey(ke.meta);
k->set_pressed(true);
k->set_scancode(KeyMappingWindows::get_keysym(ke.wParam));
k->set_scancode(KeyMappingWindows::get_keysym(MapVirtualKey((ke.lParam >> 16) & 0xFF, MAPVK_VSC_TO_VK)));
k->set_physical_scancode(KeyMappingWindows::get_scansym((ke.lParam >> 16) & 0xFF, ke.lParam & (1 << 24)));
k->set_unicode(ke.wParam);
if (k->get_unicode() && gr_mem) {