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

Media key scancode repetition #72

Closed
mondalaci opened this issue Dec 21, 2017 · 11 comments · Fixed by #120
Closed

Media key scancode repetition #72

mondalaci opened this issue Dec 21, 2017 · 11 comments · Fixed by #120
Labels

Comments

@mondalaci
Copy link
Member

On Windows {7,8,10} consumer codes are being repeated (quickly toggled) when relevant keys are pressed. I encountered similar issues earlier and though I fixed them all, but apparently not. I'll look into how Windows sends HID reports, and adjust UpdateUsbReports() accordingly.

@Lauszus
Copy link
Contributor

Lauszus commented Feb 13, 2018

I believe this is the cause of #85 and possibly also #84.

@Lauszus
Copy link
Contributor

Lauszus commented Apr 10, 2018

I believe 15d0955 fixes this.

@mondalaci
Copy link
Member Author

Unfortunately, this issue still stands.

@eltang
Copy link
Contributor

eltang commented Apr 14, 2018

I'm no USB expert, but I notice that the USB stack sends reports in response to kUSB_DeviceHidEventSendResponse. I was expecting it to rely on kUSB_DeviceHidEventGetReport, based on what I've seen other USB stacks do. What was the rationale for using the current method?

@Lauszus I believe that the code in the USB stack expects that IsUsbBasicKeyboardReportSent and friends are always false by the time control flow reaches it. It sends reports and sets those variables to true no matter what their previous values were.

@mondalaci mondalaci assigned Lauszus and unassigned mondalaci May 3, 2018
@piratk
Copy link

piratk commented May 8, 2018

It seems that this issue also affects launching the calculator, yielding a fair bunch of calculators if used on Windows.

@mondalaci
Copy link
Member Author

Yes, we know. Calculator is also a media scancode.

@Lauszus
Copy link
Contributor

Lauszus commented Jun 6, 2018

@eltang this is how all the other interfaces does it as well and they seem to not have this issue?

@Lauszus
Copy link
Contributor

Lauszus commented Jun 6, 2018

I just captured the packets while the USB keyboard was just plugged in. I then held down the volume up button and then let go a couple of seconds later.

The scan codes are NOT toggled. Everything looks alright.

Are you sure that this is not the expected behaviour on Windows? I know that in older version of Windows you could hold SUPER+e down and you could crash Windows as it would just keep opening a file explorer window. However this is fixed in Windows 10.

Here is the Wireshark capture: volume_up.pcapng.zip

@Lauszus
Copy link
Contributor

Lauszus commented Jun 6, 2018

Here is the output after applying a filer and only outputting the data:
data.txt

FYI I exported the data using the following command:

tshark -r volume_up.pcapng -Y usb.darwin.endpoint_address==0x84 -T fields -e usb.capdata > data.txt

Note that you should replace usb.darwin.endpoint_address with usb.bEndpointAddress if you are running anything except for Mac.

@Jos512
Copy link

Jos512 commented Oct 12, 2018

PS: This issue is linked from the UltimateHackingKeyboard start guide, saying:

Windows users, the Media key scancode repetition firmware bug makes media keys repeat very quickly on Windows. We're working on fixing this bug, so please bear with us.

If I understand the above merges correctly, the bug is fixed. So that information can be removed from the start guide. 🙂

@mondalaci
Copy link
Member Author

This is still an issue because we flash 8.2.5 in the factory due to the freeze bug. Will remove this sentence from the onboarding guide when the time comes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants