Skip to content

[K1 Pro] Provide weak raw_hid_receive_kb function - #506

Open
pickypg wants to merge 1 commit into
Keychron:wireless_playgroundfrom
pickypg:patch-1
Open

[K1 Pro] Provide weak raw_hid_receive_kb function#506
pickypg wants to merge 1 commit into
Keychron:wireless_playgroundfrom
pickypg:patch-1

Conversation

@pickypg

@pickypg pickypg commented Aug 5, 2026

Copy link
Copy Markdown

Added a default weak implementation for raw_hid_receive_kb to allow handling of raw HID commands.

Description

This enables the K1 Pro to support custom HID IDs added by custom firmware without first having to patch this codebase (to add this change).

I am adding this to support adding AI-status keys (that function bidirectionally) to the K1 Pro, which I have already added to an unrelated QMK keyboard.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).
    • Changes an inline false to one that can be overridden

Added a default weak implementation for `raw_hid_receive_kb` to allow handling of raw HID commands.

This enables the K1 Pro to add custom HID IDs added by custom firmware without first having to patch this codebase (to add this change).

I am adding this to support adding AI-status keys (that function bidirectionally) to the K1 Pro, which I have already added to an unrelated QMK keyboard.
@pickypg

pickypg commented Aug 5, 2026

Copy link
Copy Markdown
Author

Incase you're curious why this is necessary: I need to add custom HID commands to support custom AI Agent status keys. I have proven this works on a competitor's QMK keyboard, but I need this change to make this work on the K1 Pro (which, given how QMK firmware is built, I can do locally, but patching another repo before compilation is not ideal).

https://github.com/pickypg/claude-macropad

You can also see the code changes for K1 Pro in this branch on my repo:

https://github.com/pickypg/claude-macropad/tree/keychron/k1-pro/qmk-userspace/keyboards/keychron/k1_pro/ansi/rgb/keymaps/claude_macropad (the branch may at some point be removed / deleted).

pickypg added a commit to pickypg/ai-agent-macropad that referenced this pull request Aug 5, 2026
Keychron/qmk_firmware#506 submits this same patch (default weak
raw_hid_receive_kb()) upstream. Note it in both the patch's own
comment and the README so anyone patching by hand checks first
whether it's already been merged.
@pickypg

pickypg commented Aug 8, 2026

Copy link
Copy Markdown
Author

@lokher Hoping you can take a look at this one and merge it into the wireless_playground branch. Happy to help get this into other keyboards if you need help with that.

@pickypg

pickypg commented Aug 23, 2026

Copy link
Copy Markdown
Author

I have since made my macropad repo more specific to QMK keyboards (removing support for the RP2040, which remains in the git history). Separately, I have added support for other agents (Codex, Cursor, and Grok Build).

As a result, the links above change:

https://github.com/pickypg/ai-agent-macropad
https://github.com/pickypg/ai-agent-macropad/tree/keychron/k1-pro/qmk-userspace/keyboards/keychron/k1_pro/ansi/rgb/keymaps/ai_agent_macropad

The more I use this feature on my keyboards, the more that I think that it is invaluable. Hopefully this can be merged.

@pickypg

pickypg commented Aug 23, 2026

Copy link
Copy Markdown
Author

I also created a browser-based QMK flasher that you can use straight from GitHub.

https://github.com/pickypg/qmk-browser-flasher

GitHub Page: https://pickypg.github.io/qmk-browser-flasher/

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant