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

Add an option to exact-match keybindings #1493

Merged
merged 15 commits into from May 8, 2018

Conversation

smoogipoo
Copy link
Contributor

Fixes ppy/osu#2315 .

The cause was that Shift+Delete was being handled as a Delete keybind due to permissive matching. I discussed possible solutions with @peppy and this is the best we've come up with at the moment - passing OnKeyDown/OnAction simultaneously wouldn't solve the issue as the elements are at different depths anyway.

I still think there is some validity to passing OnKeyDown/OnAction simultaneously , but that's a future consideration and wouldn't negate this change.

@peppy
Copy link
Sponsor Member

peppy commented Apr 9, 2018

This probably deserves to be added to TestCaseKeyBindings.

smoogipoo and others added 10 commits April 12, 2018 14:55
This caused problems with Ctrl+F1 on mac :(
Because all OnPressed methods returned false, the input was propagating down to all buttons, which resulted in incorrect values for SimultaneousMode = None.

E.g. SimultaneousMode = None with Ctrl+A:
1. Pass down Ctrl+A, the Ctrl+A button responds to it but doesn't handle it.
2. Since Ctrl+A wasn't handled, A is passed down. A button gets lit up, Ctrl+A button gets released due to the simultaneous mode.
@peppy
Copy link
Sponsor Member

peppy commented Apr 18, 2018

Can trigger an assert fail:

  • Press Ctrl
  • Press D
  • Press F
  • Release D

image

@peppy peppy merged commit 11e4535 into ppy:master May 8, 2018
@smoogipoo smoogipoo deleted the keybinding-exact-matching branch November 26, 2018 02:10
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.

None yet

2 participants