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

Mimic mobile keyboard shift lock #1961

Merged
merged 4 commits into from
May 17, 2023
Merged

Conversation

zeyad-ahmad-aql
Copy link
Contributor

I wanted to mimic the mobile keyboard's shift lock behavior.

  • When you press shift once, it is locked, the next inserted character only will be inserted in uppercase, and the shift lock will reset.
  • if pressed twice, it is locked, all the characters will be inserted in uppercase, and the shift lock will remain.
  • if pressed trice, the shift lock will reset.

Other commits:

  1. There was an issue: On switch virtual keyboard layer while the shift is pressed, the new layer keycap's aren't shifted. My fix was to call the keyboard.render method on setting the virtual keyboard's currentLayer attribute if the keyboard is shifted.
  2. I also did something if you don't feel it's the behavior you need, feel free to revert it. if virtual keyboard shift is locked, insert the characters that were entered by the physical keyboard in uppercase.

@zeyad-ahmad-aql
Copy link
Contributor Author

Also add fix for caps-lock-indicator not displayed if enabled on showing virtual keyboard

@arnog
Copy link
Owner

arnog commented May 17, 2023

Excellent! Thank you.

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.

3 participants