-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
ploopyco: Expose toggle scrolling as a custom keycode #23728
base: develop
Are you sure you want to change the base?
Conversation
Just a heads up, develop has a pretty massive rework of all of the ploopy code, to unify it into a more cohesive base. (#22967) As such, the files that you're editing no longer exist on that branch, and this change will cause merge conflicts. I would recommend rebasing this to target develop instead. |
Oh sick, I hadn't seem that PR. Honestly, this was a quick and dirty PR for me to get the functionality I wanted and something to link to in this issue. I can for sure clean this up and rebase on top of that commit you linked. |
f09a037
to
5c08ade
Compare
ddcf04f
to
e6d5b5d
Compare
0ce8dc5
to
c6bd882
Compare
Generally, we want two approvals from collaborators or other exports for the PR before it's merged. So, it's mostly a waiting game. And usually, it can take a couple of weeks. There are a lot of PRs, and we all do this in our free time. |
That's a sensible policy. Thank you again for all of your efforts! |
keyboards/ploopyco/ploopyco.c
Outdated
@@ -175,7 +175,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { | |||
} | |||
|
|||
if (keycode == MOMENTARY_DRAG_SCROLL) { | |||
is_drag_scroll = record->event.pressed; | |||
is_drag_scroll ^= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a subtle thing I wanted to change.
Behavior before this commit:
- Press TOGGLE_DRAG_SCROLL and enter drag scroll mode.
- Press and hold MOMENTARY_DRAG_SCROLL leaves drag scroll mode and enters mouse mode.
- Release MOMENTARY_DRAG_SCROLL does nothing, the device stays in mouse mode instead of going back into drag scroll.
Behavior after this commit:
- Press TOGGLE_DRAG_SCROLL and enter drag scroll mode.
- Press and hold MOMENTARY_DRAG_SCROLL temporarily leaves drag scroll mode and enters mouse mode.
- Release MOMENTARY_DRAG_SCROLL returns device to drag scroll mode
- Press TOGGLE_DRAG_SCROLL to leave drag scroll mode.
I'm using my Adept with a button mapped to each of these keys and I think the new behavior is much more intuitive.
I just read this PR: #21426 |
I was just working on something similar to add custom keycodes that invert the scroll direction (for switching between Mac and Windows). Thanks for the info on the new pointing device modes. If this does get merged, you may want to swap the momentary and toggle keycodes in ploopyco.h, so that the old and new firmware use the same keycode for toggle. It might also make sense to increment the VIA firmware version, if that would allow VIA to detect between the old and new firmware features. |
@@ -18,6 +18,8 @@ | |||
|
|||
#pragma once | |||
|
|||
#define VIA_FIRMWARE_VERSION 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@light-idea Thanks for your suggestion to version bump VIA. Does this have the intended effect? I followed the commit you linked in your comment.
I was also wondering about your choice of config.h
. You chose to modify .../ploopyco/trackball/rev1_005/config.h
instead of .../ploopyco/trackball/config.h
. I think defining it in either should have the intended effect. What considerations are there with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking it over again, it's probably supposed to go in .../keymaps/via/config.h
.
But it does not seem to have the intended effect. I was hoping VIA would only show the custom keycodes supported by the current firmware version. But if I load a draft definition into VIA, it always shows the the newest firmware keycodes no matter what I have loaded on the trackball...
TOGGLE_DRAG_SCROLL, | ||
MOMENTARY_DRAG_SCROLL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@light-idea good catch with the ordering of these.
Description
The goal of this PR is to allow users to create keymaps with both momentary and toggle control over drag scroll by mapping these functions to two separate custom keycodes. This will allow people to switch between momentary and toggle control of drag scroll through VIA, instead of having to flash new firmware with different macros set.
Types of Changes
Issues Fixed or Closed by This PR
Checklist