Fix missing text input on Windows with certain keyboard layouts
Events for keys specific to certain keyboard layouts unknown to Blender were ignored. Now pass them along as unknown key events for which we can still handle text input, like we already do for Linux and macOS. Differential Revision: https://developer.blender.org/D7229
This commit is contained in:
parent
622e1591da
commit
1b1c683f74
Notes:
blender-bot
2023-02-14 05:01:20 +01:00
Referenced by issue #68577, Missing key on Swiss keyboard variants Referenced by issue #66607, AccentGrave / Tilde not accessible on certain keyboards in Windows [makes Walk/Fly difficult to access]
|
@ -1044,7 +1044,10 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
|||
GHOST_TKey key = system->hardKey(raw, &keyDown, &vk);
|
||||
GHOST_EventKey *event;
|
||||
|
||||
if (key != GHOST_kKeyUnknown) {
|
||||
/* We used to check `if (key != GHOST_kKeyUnknown)`, but since the message
|
||||
* values `WM_SYSKEYUP`, `WM_KEYUP` and `WM_CHAR` are ignored, we capture
|
||||
* those events here as well. */
|
||||
{
|
||||
char utf8_char[6] = {0};
|
||||
char ascii = 0;
|
||||
bool is_repeat = false;
|
||||
|
@ -1102,9 +1105,6 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
|||
|
||||
// GHOST_PRINTF("%c\n", ascii); // we already get this info via EventPrinter
|
||||
}
|
||||
else {
|
||||
event = NULL;
|
||||
}
|
||||
return event;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue