Fix T78412: Ctrl+Spacebar does not maximize Python console on Windows
On windows, spacebar would be passed as UTF-8 text input, despite the control key being pressed. On macOS, there already was an explicit exception for this (command key in this case), on Linux XInput already handled this case for us. Note that Alt should still allow text input, for special character sequences. Issue also happened in the Text Editor if a text data-block was set.
This commit is contained in:
@@ -1144,9 +1144,13 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
||||
int r;
|
||||
GetKeyboardState((PBYTE)state);
|
||||
|
||||
/* No text with control key pressed. */
|
||||
if (state[VK_CONTROL] & 0x80) {
|
||||
utf8_char[0] = '\0';
|
||||
}
|
||||
// Don't call ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
|
||||
// composition.
|
||||
if (MapVirtualKeyW(vk, 2) != 0) {
|
||||
else if (MapVirtualKeyW(vk, 2) != 0) {
|
||||
// todo: ToUnicodeEx can respond with up to 4 utf16 chars (only 2 here).
|
||||
// Could be up to 24 utf8 bytes.
|
||||
if ((r = ToUnicodeEx(
|
||||
|
Reference in New Issue
Block a user