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

Fix AC Pan descriptor #1085

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Fix AC Pan descriptor #1085

merged 2 commits into from
Feb 20, 2025

Conversation

Glodigit
Copy link
Contributor

@Glodigit Glodigit commented Feb 17, 2025

I spent an evening learning how to read USB HID descriptors and managed to fix #1028 / #1083 when noticing that AC pan is on a different page, thus seems to need additional bytes in the descriptor such as in [1], [2].

Tested on RP2040 running CPY 9.2.4:

# boot.py
import board
from kmk.bootcfg import bootcfg
bootcfg(    sense  = board.BUTTON,
            midi   = False,
            pan    = True,
            nkro   = True, # False was also tested successfully
            )

image

1093095 kmk.keyboard: <Event: key_number 1 pressed>: MacroKey
1093098 kmk.keyboard: coordkeys_pressed={1: MacroKey}
1093100 kmk.modules.macros: on_press
1093101 kmk.keyboard: axes={Axis(code=3, delta=-1)}
1093269 kmk.keyboard: <Event: key_number 1 released>: MacroKey
1093272 kmk.keyboard: coordkeys_pressed={}
1093274 kmk.modules.macros: deactivate
1094384 kmk.keyboard: <Event: key_number 0 pressed>: MacroKey
1094386 kmk.keyboard: coordkeys_pressed={0: MacroKey}
1094388 kmk.modules.macros: on_press
1094389 kmk.keyboard: axes={Axis(code=3, delta=1)}
1094560 kmk.keyboard: <Event: key_number 0 released>: MacroKey
1094563 kmk.keyboard: coordkeys_pressed={}
1094564 kmk.modules.macros: deactivate

@xs5871
Copy link
Collaborator

xs5871 commented Feb 18, 2025

What version of Windows are you using?
The links you provide don't include any information why this descriptor is wrong, the USB spec doesn't say it's wrong, it works on Linux, Mac, and afaik recent Windows.

@Glodigit
Copy link
Contributor Author

Windows 10 22H2

@xs5871
Copy link
Collaborator

xs5871 commented Feb 19, 2025

Strange, but fair enough.
Please fix the linter complaint. Tip: run make test before a PR.

@xs5871 xs5871 merged commit 2172665 into KMKfw:main Feb 20, 2025
1 check passed
@Glodigit Glodigit deleted the pan branch February 20, 2025 15:09
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.

[BUG] Enabling pan causes error code 10
2 participants