yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.19k stars 123 forks source link

mouse rule doesn't work, please help #84

Closed ghost closed 3 years ago

ghost commented 4 years ago

I'm trying to set on my mouse the function: any key + button4 -> any key + left_arrow (for example, left_command + button4 -> left_command + left_arrow) but I get this error "ERROR: invalid special key keyword :##, no key :Failed!" Here is the incorrect code:

{:des "Tecknet Wireless Mouse keys mapping" :rules [:twm [:##{:pkey :button4} :left_arrow] [:##{:pkey :button5} :right_arrow] ]}

I need your help!

ghost commented 4 years ago

Is there a way to use !/!!/#/## with pointing buttons (mouse) like {:pkey ...}?

bangedorrunt commented 4 years ago

@MagnificentSteiner just use :##button4. you had wrong syntax

ghost commented 4 years ago

@babygau No, actually it doesn't work, the correct syntax for mice buttons is, for instance, {:pkey :button4}. Just :button4 (or :##button4) is not recognized because it's not a key but a pointing key.

bangedorrunt commented 4 years ago

Unfortunately, I don't find :pkey in goku key info

ghost commented 4 years ago

@babygau Yes, they didn't specified the {:pkey :buttonx} syntax there. Though, you can verify that in almost every dotfile shared as examples in "Goku in the wild" section there is this syntax {:pkey :buttonx}. See for example, https://github.com/yqrashawn/yqdotfiles/blob/master/.config/karabiner.edn

bangedorrunt commented 4 years ago

hmm, interesting, I missed that.

How about {:pkey :button4 :modi :any :lazy true} or {:pkey :button4 :modi [:any] :lazy true}. I'm not sure about the correct syntax, couldn't test it now.

ghost commented 4 years ago

@babygau Thank you very much, now both ways work fine.

yqrashawn commented 4 years ago

Really thanks for your help @babygau

Can this be closed? @MagnificentSteiner