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:
parent
ee351cb74d
commit
87062d4d67
Notes:
blender-bot
2024-05-31 15:34:53 +02:00
Referenced by commit 8ef05d3180
, Fix T79636: Inserting special characters with Ctrl+Alt broken on Windows
Referenced by issue #79702, Windows Lock Screen (Windows+L) writes a single character 'l' in the Text Editor
Referenced by issue #79636, Text Editor: Issues with ALT key
Referenced by issue #78412, Ctrl + Spacebar does not maximize Python Console
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue