Fix grabbing Alt+Tab and Alt+Esc on Windows 7

This commit is contained in:
Cameron Gutman 2021-01-25 18:40:26 -06:00
parent e1f73e642b
commit 2793c9cfb0
1 changed files with 9 additions and 0 deletions

View File

@ -457,6 +457,15 @@ WIN_KeyboardHookProc(int nCode, WPARAM wParam, LPARAM lParam)
case VK_RCONTROL: case VK_RCONTROL:
scanCode = SDL_SCANCODE_RCTRL; scanCode = SDL_SCANCODE_RCTRL;
break; break;
/* These are required to intercept Alt+Tab and Alt+Esc on Windows 7 */
case VK_TAB:
scanCode = SDL_SCANCODE_TAB;
break;
case VK_ESCAPE:
scanCode = SDL_SCANCODE_ESCAPE;
break;
default: default:
return CallNextHookEx(NULL, nCode, wParam, lParam); return CallNextHookEx(NULL, nCode, wParam, lParam);
} }