This is necessary following rP25180, which now handles key-up in input to prevent hotkeys from firing then.
Hotkeys are a global system, which means opening e.g. the chat window or the summary does't reset things. If you press "S" to scroll the in-game camera down, then press 'return' to open the chat, the camera keeps scrolling down. Following rp25180, it never released since it never got the keyup.
In general, I think thie behaviour makes limited sense -> you could start a hotkey on a given GUI page, and release it on another GUI page which doesn't even have that hotkey. I doubt we have many weird cases, but they could exist. However, at the moment, I'm leaving that in, because e.g. the in-game summary is a different page and this allows the scrolling there to continue - we'll see what the future holds.
However, it's definitely broken if input fields get focused, as happens with the chat window.
This explicitly clears hotkeys immediately in that case.