Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] Modifiers pressed during window / desktop switching animations are not recorded #10600

Open
wants to merge 1 commit into
base: SDL2
Choose a base branch
from

Conversation

tesonep
Copy link

@tesonep tesonep commented Aug 27, 2024

In OSX, when we change from one application to other and in them middle of the transition animation we press a modifier key, the modifier key down is not sent to the application.

Adding the checking of the modifier to see if it was correctly handled when checking a later key down.

Description

SDL is handling the modfiers of the keyboard by only updating them when Cocoa sends the key down/up event for that modifier. It is handling the NSEventTypeFlagsChanged event, but this event only arrives when the window has focus, so if the CMD (in this case) key is pressed while there is not focus, the modifier is not updated. So, in the application we are getting a V, and not a CMD+V.

I have added a check of the flags in all the events. The flags are only notified if they have changed.

…le of the transition animation we press a modifier key, the modifier key down is not sent to the application.

Adding the checking of the modifier to see if it was correctly handled when checking a later key down.
@tesonep
Copy link
Author

tesonep commented Aug 27, 2024

More details to reproduce this issue can be found in our usage of SDL: pharo-project/pharo#16700

@tesonep tesonep changed the title Modifiers pressed during window / desktop switching animations are not recorded [OSX] Modifiers pressed during window / desktop switching animations are not recorded Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant