Skip to content

Do not recognise digits as valid first keys if Shift is depressed. #1997

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

Closed

Conversation

smblott-github
Copy link
Collaborator

Currently, we cannot set passkeys for symbols accessed with Shift depressed on a digit key: e.g. $, *. This affects native keyboard shortcuts in GMail.

@mrmr1993. This would be fixed if we had event.key, right? In the meantime, is this fix correct? Surely there are no keyboards with digits requiring the Shift key?

Fixes #1996.
Fixes #1757.

Currently, we cannot set passkeys for symbols accessed with `Shift`
depressed on a digit key: e.g. `$`, `*`.  This affects native keyboard
shortcuts in GMail.

Fixes philc#1996.
Fixes philc#1757.
@mrmr1993
Copy link
Contributor

Haven't tested (I'm away for a few days), but I expect this breaks g$ on google (we leak the $'s keydown).

Adding a shift modifier (eg. <s-1>) and implementing #1368 or similar would be the way I would look to solve the problem.

This would be fixed if we had event.key, right?

Yes, event.key fixes all of the edge cases for our key handling.

@smblott-github
Copy link
Collaborator Author

but I expect this breaks g$ on google (we leak the $'s keydown)

You mean Google's instant predictions? Yup. It breaks g$ in that case.

To summarize:

  • We're currently incorrectly blocking keydown events on one important Google site (GMail).
  • But the fix - which is correct in principle, I think - breaks another important Google site (if instant prediction is enabled).

(Google instant prediction and Vimium aren't great bedfellows.)

@lydell
Copy link

lydell commented Feb 18, 2016

The widely used AZERTY layout has symbols on the number row and numbers in its shift layer. So there are many users who must use shift to type numbers :)

Se programmers also like to swap the regular and shift layers of the number row because they feel that they use symbols more often than numbers, which reduces the need to press shift.

@smblott-github
Copy link
Collaborator Author

Thanks for the input, @lydell. So, I guess we're leaking a lot of keydown events on AZERTY keyboards.

In any case, the status quo wins. In light of the points from @mrmr1993 and @lydell, we probably just stick with the status quo until event.key is available.

@smblott-github smblott-github deleted the fix-shift-digit-passkeys branch February 21, 2016 07:59
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.

Asterisk is not being passed through as an excluded key cannot exclude '#' keybinding
3 participants