forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Crossover bilateral combinations for dual-hand chords and rolls #54
Closed
sunaku
wants to merge
5
commits into
manna-harbour:bilateral-combinations
from
sunaku:bilateral-combinations-crossover
Closed
Crossover bilateral combinations for dual-hand chords and rolls #54
sunaku
wants to merge
5
commits into
manna-harbour:bilateral-combinations
from
sunaku:bilateral-combinations-crossover
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
This fixes a glitch in Miryoku's bilateral-combinations implementation where the GUI modifiers in a mod-tap key combination are always sent to the computer alongside the combination, interrupting the user's typing. For example, suppose you held LGUI_T(KC_A) and then pressed KC_R with the same hand (assuming your left hand on the standard QWERTY layout). Before this patch, the combination sends KC_LGUI to the computer when LGUI_T(KC_A) is held, followed by KC_A and KC_R when finally released. This inadvertently triggers whatever action is associated with KC_LGUI on the computer, such as opening the "Start Menu" in Microsoft Windows. With this patch applied, the combination doesn't send KC_LGUI to the computer when LGUI_T(KC_A) is held. Instead, it applies the KC_LGUI modifier *internally* for bilateral_combinations_hold() and therefore only sends out KC_A and KC_R to the computer as the user would expect. However, note that non-GUI modifiers such as Shift/Ctrl/Alt are still sent to the computer for unilateral mod-tap combinations to allow for modified mouse clicks such as Shift-click, Ctrl-click, Alt-click, etc.
sunaku
changed the title
Crossover bilateral combinations for dual-handed chords and rolls
Crossover bilateral combinations for dual-hand chords and rolls
Oct 16, 2022
sunaku
force-pushed
the
bilateral-combinations-crossover
branch
2 times, most recently
from
October 17, 2022 22:43
e07f3bc
to
7f7204b
Compare
Super+Period was triggering Start Menu afterwards, like a "flash mod".
I've replaced the -#define BILATERAL_COMBINATIONS_FLASHMODS MOD_MASK_GUI
+#define BILATERAL_COMBINATIONS_DEFERMODS 100 |
sunaku
force-pushed
the
bilateral-combinations-crossover
branch
from
October 28, 2022 19:09
f2ee6b1
to
ab8d095
Compare
For your testing convenience, I've created a modernized version of this PR that is updated to a recent QMK mainline (0.18.6). |
Superseded by PR #56. |
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.
Thanks to the increased typing speed made possible by PR #48, I discovered a blind spot in the bilateral combinations concept and patched it in a new optional feature called "crossover" bilateral combinations (implemented in this PR) to catch fast "rolls" that cross the left/right keyboard boundary. For example, imagine that you had Miryoku-style home row mods on the standard QWERTY layout so that typing the word "jam" involves the
RSFT_T(KC_J)
andLGUI_T(KC_A)
keys. 👉 Regular bilateral combinations would ignore this combination since the keys are located on different sides of the keyboard, thereby sendingRSFT(KC_A)
to the computer. ☝️ In contrast, crossover bilateral combinations catch this combination (if you're quick enough, according to a configurable timeout) and sendKC_J
andKC_A
to the computer, thus avoiding accidental mods.Here is the relevant portion of my
config.h
file which activates both patches to provide the best typing experience I've felt since switching to Miryoku's home row mods ~2 years ago, as detailed in Taming home row mods with Bilateral Combinations:You also need to add the following line to your
rules.mk
file to enable QMK's deferred execution facility, used by DeferMods:DEFERRED_EXEC_ENABLE = yes
Note: QMK's deferred execution feature was introduced 1 year later (on 16 November 2021 in commit 36d123e) after the latest in Miryoku's bilateral-combinations branch! So in order to try out my latest changes, you'll need to update this branch to a more recent version of mainline QMK. I've already done this (resolving merge conflicts) in a separate branch based on 0.18.6, so simply check out that branch and configure your
config.h
andrules.mk
files (as I've documented previously) to try it out.