Closed kaushikgopal closed 4 years ago
i tried this but it doesn't seem to have an effect from the left_control
perspective:
{:des "caps lock: alone: escape; held: ctrl"
:rules[
[:##caps_lock nil nil {:alone :escape :held :left_control} ]
]
}
I know this should be theoretically possible with Karabiner-Elements cause there's a complex json rule (apparently) that works for this case.
Would love to learn how to elegantly express this with goku 🙏
I realize just adding the two separate rules, seems to do the trick?
{:des "caps lock -> ctrl"
:rules [
[:##caps_lock :left_control nil {:alone :escape}]
[:!Th :left_arrow]
[:!Tj :down_arrow]
[:!Tk :up_arrow]
[:!Tl :right_arrow]
[:!TSh :!Sleft_arrow]
[:!TSj :!Sdown_arrow]
[:!TSk :!Sup_arrow]
[:!TSl :!Sright_arrow]
[:!TCh :!Cleft_arrow]
[:!TCj :!Cdown_arrow]
[:!TCk :!Cup_arrow]
[:!TCl :!Cright_arrow]
[:!TCSh :!CSleft_arrow]
[:!TCSj :!CSdown_arrow]
[:!TCSk :!CSup_arrow]
[:!TCSl :!CSright_arrow]
[:!TOh :!Oleft_arrow]
[:!TOj :!Odown_arrow]
[:!TOk :!Oup_arrow]
[:!TOl :!Oright_arrow]
[:!TOSh :!OSleft_arrow]
[:!TOSj :!OSdown_arrow]
[:!TOSk :!OSup_arrow]
[:!TOSl :!OSright_arrow]
]}
Not sure if there's a more elegant way to express this, but this should work in terms of satisfying my requirements.
This is my preferred way. You can also set a variable in caps_lock to section.
[:##caps_lock ["super_caps_mode" 1] nil {:alone :escape}]
But then you need to map each key in super_caps_mode
and also those that you want to fallback to control.
I'm trying to "supercharge" my caps lock key with the following behavior:
alone
- sendescape
keyleft_control
caps_lock + j
-> senddown_arrow
)Any 2 of the above conditions is possible, but if i want to write a goku rule to encompass all 3, i can't seem to find a way to do it, without tediously jotting down all the possible combinations? seems like i'm missing something basic in the way i have my rules listed out. Currently what i have:
I feel there's got to be a better way to say, default to left_control when held, but under special cirucmstances do a different action