Merge pull request #66314 from bruvzg/win_fix_wm_char_keysym3

[Windows, 3.x] Fix WM_CHAR processing code using Unicode char instead of Virtual key.
This commit is contained in:
Rémi Verschelde 2022-09-24 22:59:56 +02:00 committed by GitHub
commit c5c5abeaa7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1221,7 +1221,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) {