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

modify getKeyCodeEvent to match better. Fixes 336 #338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wesbos
Copy link
Contributor

@wesbos wesbos commented Feb 1, 2023

When toptal updated the codebase, the logic for finding the keycode was too strict. It was expecting both the .code and the .key - so that filtered out descriptions on keys without one of those values. Importantly this was excluding every single modifier key - like Shift + a being code A.

Easy fix - it should a bit more relaxed on finding. The code first, if not, the key.

Fixes #334

Copy link

@macap macap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing, @wesbos!
However, whereas this PR does fix the delete key description (as well as some other keys)

Zrzut ekranu 2023-02-3 o 13 41 38

it actually causes incorrect behavior in other keys, such as:

Zrzut ekranu 2023-02-3 o 13 35 23
Zrzut ekranu 2023-02-3 o 13 35 51
Zrzut ekranu 2023-02-3 o 13 34 54

Zrzut ekranu 2023-02-3 o 13 37 12

Which is also confirmed by the broken E2E pipeline.
We have added this to our backlog, but we’ll still appreciate contributions

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.

The Delete button does not have a description
2 participants