-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Disable Auto shift when LGUI is pressed (for copy or other actions) #1190
Comments
Here you go for the copy (remember to use mod morph in the keymap): as: auto_shift {
compatible = "zmk,behavior-hold-tap";
label = "AUTO_SHIFT";
#binding-cells = <2>;
tapping-term-ms = <210>;
quick-tap-ms = <0>;
flavor = "tap-preferred";
bindings = <&kp>, <&kp>;
};
modcp: mod_copy {
compatible = "zmk,behavior-mod-morph";
label = "MOD_COPY";
#binding-cells = <0>;
bindings = <&as LS(C) C>, <&kp C>;
mods = <(MOD_LGUI | MOD_RGUI)>;
};
usage in keymap:
&modcp |
Thanks for your time, @MatCyg! Unfortunately, this still does not work (at least, on a Corne-ish Zen). I assigned Depending on the active application, the behavior may be the undesired one (for instance on a browser it brings up the developer section) or in iTerm it brings up menus... |
Sorry, I misunderstood. I don't think you can do it with mod morph, but it is fairly easy with a macro. An idea is to switch to normal alpha layer without auto shift when you press CMD. This way you do it for all your keys, not only copy/paste. ZMK_MACRO(cmdAlpha,
wait-ms = <0>;
tap-ms = <0>;
bindings
= <¯o_press &mo ALPHA &kp LGUI>,
<¯o_pause_for_release>,
<¯o_release &mo ALPHA &kp LGUI> ;
) |
Thank you, @MatCyg ! Will try it out! |
Did this work? I don't quite understand how that solution works or how to implement it. |
@MatCyg What if you set "hold-trigger-key-positions" to an empty array in your auto shift definition? |
@elismaga I think the suggestion looks like this: feerrenrut/ergodox-zmk-config@e75d0ce One issue is that a macro needs to be created for each mod key that used. I'll need separate macros for each of the following:
It would be nice if a macro accepted arguments, then you could make a macro to use like |
@feerrenrut, I'm new to ZMK, and maybe I'm missing some nuance here (or maybe this is new functionality introduced since you commented), but it seems https://zmk.dev/docs/keymaps/behaviors/macros#parameterized-macros provides you with the ability to use macros with up to two arguments. |
Hi, everyone! I recently enabled auto-shift on my Corne-ish Zen. That works fine except for the copy - paste commands where instead of
LGUI+C
, what is sent isLGUI+SHIFT+C
if I accidentally hold it for longer thantapping-term-ms
.Is it possible to prevent the hold-tap behavior altogether when LGUI (or any other key) is pressed before? I tried the following unsuccessfully:
The text was updated successfully, but these errors were encountered: