-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts #11059
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
afd5ac3
to
cdba67b
Compare
This comment has been minimized.
This comment has been minimized.
10b3d9e
to
579a3f2
Compare
Alright, so I'm changing up how |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I plan to rework this to play more nicely with the rest of QMK and hopefully finalize everything + merge custom shifts over Spring Break (by the 13th). |
Sorry about that, GitHub decided to delete the |
f6d93c5
to
dc6a0d8
Compare
dc6a0d8
to
839a3f0
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
8e5bdea
to
c883cac
Compare
This comment has been minimized.
This comment has been minimized.
Retro Tapping appears to break with The behavior is incorrect if I press the layer tap then the other key in quick succession but if I wait long enough the behavior is correct (ie. it outputs the keycode from the layer as it should) |
Fixed. Not related to |
There's waaaaay too much |
83b1f2a
to
809fed1
Compare
Just a heads-up, I intend to push this PR through this breaking changes cycle. Unfortunately this PR changes areas of the code that have also had merges this breaking changes cycle, and I’m unsure of how the behaviour interacts… otherwise I’d resolve the conflicts myself. At this point it'd be great if you could get these conflicts sorted -- apologies if we create more conflicts during merges of other PRs — at this point the quicker they're sorted the more likely this makes it in first. |
91252ba
to
865f580
Compare
Those should be handled. No major conflicts, and nothing I wasn't expecting. Glancing over the overall diff everything looks fine. I tested this feature and with Auto Shift disabled again, but not with EDIT: I just had to flash both sides, which I usually avoid so I have one working half if I break something. |
Doesn't have merge conflicts with #11036 but either will need to be updated when the other is merged. |
Deferring to next cycle due to conflicts at the time we're locking the branch. |
865f580
to
e9f7164
Compare
e9f7164
to
1307dec
Compare
that broke compilation because of a typo: KEYPRESS should have been KEY_PRESS
* qmk/develop: More headroom. (qmk#15302) More headroom. (qmk#15301) Documentation typo fix (qmk#15298) New feature: `DYNAMIC_TAPPING_TERM_ENABLE` (qmk#11036) Tidy up adjustable ws2812 timing (qmk#15299) Add ifndef to WS2812 timing constraints (qmk#14678) Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts (qmk#11059)
# ifdef RETRO_TAPPING_PER_KEY | ||
get_retro_tapping(tapping_keycode, keyp) && | ||
# endif | ||
(RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0) |
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.
Is there a good reason why 0 is added to RETRO_SHIFT
here and on line 363?
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.
One can #define RETRO_SHIFT
without a value, which just makes holds without interrupting keypresses send the shifted key. Defining it to a value makes mod taps' hold actions trigger after that many ms, like the default behavior with TAPPING_TERM
to allow using mod taps with the mouse.
Adding zero makes the former compile. I suppose those conditionals could not have the +0
and be in another #if
, but there are quite enough preprocessor macros in this haha
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.
I assume you saw that when working on #15741 - I'll try to test that with Retro Shift (base Auto Shift won't have any issues) too soon, but if/when you have a go at it note that you have to add mod/layer taps to Auto Shift.
This pull request will allow one to use Auto Shift (AS) on a key but also use it as a modifier - three keys in one, and it feels like they're completely separate! I've been using a very janky hardcoded version of this for months, it's great. It will also add support for custom AS keys, as things like
.
and!
are clearly a better match than those they currently have.Description
This is a recode of #9889, as upon further testing it didn't work when
TAPPING_TERM
was not exceeded (and Auto Shift now supports keyrepeat).p00ya#2 has also been merged with this pull as there are quite a few conflicts between the two features. I also don't want to have to manage those conflicts once I've forgotten how AS works (I had a custom shifts pull open for months and then helped completely rewrite Auto Shift and got that merged first).
get_custom_auto_shifted_key
was added, asget_auto_shifted_key
would result in a lot of duplicate and possibly outdated code (e.g. if a#define
is added to Retro Shift everything).AUTO_SHIFT_TIMEOUT_PER_KEY
,AUTO_SHIFT_REPEAT_PER_KEY
, andAUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY
were also added, as they are nearly a necessity with the many different purposes custom shifted keys can have.HOLD_ON_OTHER_KEY
is already handled, so if that is merged it's not an issue.Known Bugs/Inconsistencies/Todo
Retro Shift:
Custom Shifts:
Bugfixes
Fixed rolling from one AS key to another and holding the second sending both unshifted
Stopped tapping an AS key, tapping a non-AS key, and holding the same AS key from keyrepeating
Alternate #12083, as it won't work for Custom Shifts
Types of Changes
Checklist