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

Modified keycodes work inconsistently on Chrome OS (and Linux?) #166

Open
bcat opened this issue Oct 12, 2020 · 1 comment
Open

Modified keycodes work inconsistently on Chrome OS (and Linux?) #166

bcat opened this issue Oct 12, 2020 · 1 comment

Comments

@bcat
Copy link
Contributor

bcat commented Oct 12, 2020

Describe the bug
Modified keycodes (such as the shifted keycodes) work fine on Windows, but generally don't work on Chrome OS. (Given that Chrome OS runs Linux under the hood, I suspect Linux suffers from the same issue, but I don't have a Linux system at hand to check.)

I think the issue is that BlueMicro firmware sends two reports for a modified keycode:

  • Report 1: modifier down, base key down
  • Report 2: modifier up, base key up

Whereas QMK seems to send four reports:

  • Report 1: modifier down, base key up
  • Report 2: modifier down, base key down
  • Report 3: modifier down, base key up
  • Report 4: modifier up, base key up

To support this theory, if you press multiple keys mapped to modified keycodes at the same time, Chrome OS does interpret most of them as modified. This makes me think Chrome OS (and probably Linux) get confused if the modifier and the base key don't go down/up in separate key reports.

QMK has a "weak mods" mechanism that it uses to implement modified keycodes, but I'm not sure if BlueMicro needs anything that advanced. I think all we need is a way to force extra key reports between modifier and base key (un)register.

To Reproduce
Steps to reproduce the behavior:

  1. Flash a BlueMicro keyboard using modified keycodes (e.g., the shifted keycodes often used on the top row of 40% keyboards).
  2. Pair with Chrome OS (or Linux?).
  3. Press the keys in question.
  4. Observe that the keys are interpreted as unmodified.

Expected behavior
Modified keys work on all platforms.

@bcat
Copy link
Contributor Author

bcat commented Oct 12, 2020

Although in practice, if we spread these keys across more reports, there may be race conditions if we don't introduce a mechanism like weak mods, which are cleared if a different key is pressed.

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

No branches or pull requests

1 participant