-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Ignore keydown
events for modifier keys when accumulating key sequence
#245
Ignore keydown
events for modifier keys when accumulating key sequence
#245
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Hi @ph-ph, given the concerns you raise, I'd be in favor of only ignoring modifier key codes with the name |
cc @jasongrout who made the original suggestions for handling the issue |
Thank you, @blink1073 . I renamed |
Thanks! I'm currently stuck in a release quagmire. 😄 I will review tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
This change addresses JupyterLab issue: jupyterlab/jupyterlab#7702 .
It follows the strategy proposed by @jasongrout in the issue comments:
isIgnoredKey
method to keyboard layout interfaceI can see several reasons for why the change might be concerning:
keyCode
to detect modifier keys, which is probably not the best way in the long runLet me know if you think there's a better way.
How it was tested
commands
andkeyboard
packagesdockpanel
example to have shortcuts like "Shift C Ctrl P", verified that the shortcuts worked as expected.