Input bug while SDK's UI is active while alt tabbed
I've noticed a weird input bug where the SDK will process input from typing done outside of the game if the SDK's UI is active.
Example involving the freecam mod:
- Load into a mission
- Activate the SDK's UI with `
- Alt tab and type "k" in a separate program
- Alt tab back to Hitman and press ` to hide the SDK's UI
- Freecam will activate
I think it might affect other keys/mods as well but the freecam is the easiest to test.
After doing some testing, I observed that the issue also occurs when the menu is opened without alt-tabbing. Pressing "K" while the menu is open results in those inputs being queued and executed once the menu is hidden. For instance, pressing "K" and "F9" ("Kill NPC") while the menu is open, then hiding the menu, causes both freecam to activate and the NPC being looked at to die. This probably confirms that inputs made while the menu is open are being stored and processed after the menu is closed. However, I haven't been able to identify how to fix this yet.