yqrashawn / GokuRakuJoudo

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

I want to perform an action when command key is held - but still keep "holding" command key #131

Closed Madd0g closed 3 years ago

Madd0g commented 3 years ago

I came really close to what I wanted to do, variable on single press, something else on hold

[:##left_command :left_command nil {
     :delayed {
        :invoked ["gui_pressed" 0]
        :canceled ["gui_pressed" 0]} 
     :alone ["gui_pressed" 1] 
     :held [{:key :##left_command}[:hsl "holdCommand()"]]
     :afterup [:hsl "releaseCommand()"] :params{:held 50}}]

but I also want for it to keep "holding" the left_command, but instead it's like it's not pressed (for example pressing tab after the "held" threshold only sends tab, not cmd+tab)

I tried all kinds of things in :held but couldn't find anything that worked, any advice?

Madd0g commented 3 years ago

I figured that actually dropping a :left_command in the end of the :held list, it works:

     :held [[:hsl "holdCommand()"] :left_command]