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

Konami code is finnicky #17

Open
greglook opened this issue Sep 8, 2014 · 0 comments
Open

Konami code is finnicky #17

greglook opened this issue Sep 8, 2014 · 0 comments
Assignees

Comments

@greglook
Copy link
Member

greglook commented Sep 8, 2014

See this output of the button press events and the value of matched-prefix-len:

:button/press :up
1
:button/press :up
2
:button/press :up
:button/press :up
1
:button/press :down
:button/press :up
1
:button/press :up
2

Basically, the first 'wrong' button doesn't count as the first matched button, even if it's the correct one ('up' in this case). Probably the right approach here is to add a generic handler middleware which keeps a buffer of the last n button presses, which further control-code middlewares could use to match against the codes they're configured with.

Geeber added a commit that referenced this issue Nov 10, 2014
Geeber added a commit that referenced this issue Nov 10, 2014
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

2 participants