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

CMD key on osx suppresses all key up events #1519

Open
connorjclark opened this issue Dec 14, 2023 · 1 comment
Open

CMD key on osx suppresses all key up events #1519

connorjclark opened this issue Dec 14, 2023 · 1 comment
Milestone

Comments

@connorjclark
Copy link
Contributor

This may be an allegro issue or an OSX issue... but I don't get keyup events for any keys at all if CMD is held down. I added logging to _al_osx_keyboard_handler keybd.m and confirmed that there just isn't any event send if CMD is down. This is directly from keyDown:(NSEvent*) so it seems like an OSX issue, but maybe there's a way to opt into better key events?

I found this solution: https://lists.apple.com/archives/cocoa-dev/2003/Oct/msg00442.html

Extending NSApplication sendEvent: apparently does the job. Not sure how to do that for allegro. Gotta figure out how to extend a class in objc, and I guess replace [NSApplication sharedApplication]; with the subclass one?

https://forums.macrumors.com/threads/why-cant-i-subclass-nsapplication.185009/

@dionoid
Copy link

dionoid commented Dec 23, 2023

I noticed the same allegro issue in OSX and it causes unwanted key-repeats in an emulator I'm currently working on.
As a workaround, I'm calling al_clear_keyboard_state after each normal key's keydown event, which is far from ideal and needs ALLEGRO_UNSTABLE defined.

Note that these missing keyup events are also noticeable in OSX allegro when you press a key while switching in and out a window, see issue #728

@SiegeLord SiegeLord added this to the 5.2.11 milestone Nov 26, 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

No branches or pull requests

3 participants