-
Notifications
You must be signed in to change notification settings - Fork 174
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
Mouse key support in QMK keyboard #115
Open
ak66666
wants to merge
7
commits into
hrvach:rc
Choose a base branch
from
ak66666:rc_ak66666
base: rc
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Forgot to mention: this change also fixed all three mouse buttons and up/down wheel scroll too. |
- Single unified firmware binary - Improved support for NKRO keyboards - Report mode default for keyboard port - Improved consumer control parser for variable data types (media keys should be better supported) - System control forwarding - Improved HID parser - Web UI to configure instead of keyboard shortcuts - Firmware upgrade while the device remains functional - Only one end will need upgrade, the other will get it automatically - No need to recompile to set most settings - Improved UART routines to use DMA, more reliable link - Fixed a bunch of bugs and issues
How do you define the mouse keys in a QMK keyboard? I have one and am interested to reproduce the issue locally in case it needs wider fixing. |
Hi,
You just turn mouse key support in the keyboard info.json fille: "mousekey": true
And then use them in keymap.c file:
KC_WH_D, KC_MS_U, KC_WH_U,
KC_MS_L, KC_MS_D, KC_MS_R,
The official documentation is here: https://docs.qmk.fm/features/mouse_keys
As example, you may look into my layout:
https://github.com/ak66666/qmk_firmware/blob/thumbsup_20231028/keyboards/thumbsup/keymaps/default_4x12_no_plover_via/keymap.c
https://github.com/ak66666/qmk_firmware/blob/thumbsup_20231028/keyboards/thumbsup/rev10_rp2040_unibody_4x12/info.json
EDIT: removed the email personal details.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change made the mouse work with Deskhop in my QMK-base keyboard.
I added a special case to handle mouse keys and touchpad in QMK keyboard.
It is uses report id 2 to detect the mouse endpoint and adjusts the offset value.
This data was captured in Wireshark for the mouse keys and trackpad used in my board:
LEFT : HID Data: 0200f8000000
RIGHT : HID Data: 020008000000
UP : HID Data: 020000f80000
DOWN : HID Data: 020000080000
The original RC branch code treated LEFT mouse key (or trackpad gesture) as UP, so I figured the issue was in that one byte offset. I added the special case for report_id == 2 (which I believe describes the mouse USB endpoint).