diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 473607448b..7d7fbcf5b7 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -1074,6 +1074,16 @@ namespace MainWindow Core_EnableStepping(pause); } } + + if (wParam == WA_INACTIVE) { + // Force-release TAB, which is the most annoying one when alt tabbing + // This isn't exactly a correct solution but will fix this annoyance for many. + KeyInput key; + key.deviceId = DEVICE_ID_KEYBOARD; + key.keyCode = NKCODE_TAB; + key.flags = KEY_UP; + NativeKey(key); + } } break;