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

COMMON: Allow registering multiple event mappers #3735

Merged
merged 1 commit into from Jun 18, 2022

Conversation

ccawley2011
Copy link
Member

@ccawley2011 ccawley2011 commented Mar 1, 2022

No description provided.

@aquadran
Copy link
Member

@aquadran aquadran commented Mar 3, 2022

can you put some description, why this change? :)

@ccawley2011
Copy link
Member Author

@ccawley2011 ccawley2011 commented Mar 3, 2022

I'm hoping to rebase PR #401 at some point, and this is necessary for it to co-exist with the keymapper.

@OMGPizzaGuy
Copy link
Member

@OMGPizzaGuy OMGPizzaGuy commented Mar 5, 2022

This makes sense to me. I considered recommending KeymapMatch for mapEvent return type, but the bool is likely more appropriate.

@sev-
Copy link
Member

@sev- sev- commented Jun 18, 2022

Thank you, merging

@sev- sev- merged commit cb3a024 into scummvm:master Jun 18, 2022
8 checks passed
@ccawley2011 ccawley2011 deleted the multiple-event-mappers branch Jun 18, 2022
@criezy
Copy link
Member

@criezy criezy commented Jun 19, 2022

The change from this pull request causes every Esc key events to be sent twice. Any idea why that is?
It seems to only happen with the Esc key.

I first noticed it in the AGS, engine, but you can see that in the Launcher as well. By default the Esc key closes the current dialog, and now if you open the Options dialog and then press Esc it closes not only the Options dialog, but also the Launcher (and thus quits ScummVM). And if from the Options dialog you open the Fluidsynth dialog, pressing Esc once will close both the Fluidsynth and the Options dialog, and you end up in the Launcher.

@criezy
Copy link
Member

@criezy criezy commented Jun 19, 2022

The change from this pull request causes every Esc key events to be sent twice. Any idea why that is?

Fixed in 63cef72 I think.
I hope the fix is fine. I fixed the Escape key down/up events being sent twice, and the formatting of the code suggested that the ; after if (!matchedAction) was indeed not supposed to be there.
I am not quite sure why the Escape key is mapped to itself, but that caused it to be dispatched as a mapped event and then again as a non-mapped one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants