-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Currently, when receiving WindowEvent::KeyboardInput events, it is not possible to detect when all shift keys have been released unless manually tracking the shift key state. This is the case for all modifiers.
The cause of this is that the modifiers get updated after the events are sent, which means that shift press key events do not have the modifiers shift set, but shift release events always do have them set. As a result, it's impossible to know if RShift is still held when the released event for LShift comes in.
My proposal to solve this would be to just update the shift state before sending the key events. This would mean that when LShift comes in and the shift modifier is still set, RShift must still be held.
Of course this is a breaking change and I'm not sure what inspired the initial design, which is why I haven't looked into the code changes myself yet. But are there any specific reasons why this would be a bad idea?