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

Fix input bindings involving shift and a character #403

Merged
merged 1 commit into from
Oct 21, 2024
Merged

Conversation

LucasPickering
Copy link
Owner

@LucasPickering LucasPickering commented Oct 21, 2024

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

When a key combination involves "shift", crossterm reports the keycode as a capital letter (e.g. KeyCode::Char('G')). This was breaking the equality matching.

Closes #401

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

Further fragile logic. Mitigated with some tests. I totally believe there's other input bugs in there though.

QA

How did you test this?

Added some unit tests, tested in the TUI

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

When a key combination involves "shift", crossterm reports the keycode as a capital letter (e.g. KeyCode::Char('G')). This was breaking the equality matching.

Closes #401
@LucasPickering LucasPickering enabled auto-merge (rebase) October 21, 2024 11:39
@LucasPickering LucasPickering merged commit adcca44 into master Oct 21, 2024
15 checks passed
@LucasPickering LucasPickering deleted the input-bug branch October 21, 2024 11:40
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.

Input Binding with shift modifier not working when trying to map a key that is mapped without the modifier
1 participant