yqrashawn / GokuRakuJoudo

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

Making caps lock escape when tapped, but hold for "hyper" #127

Open ghost opened 3 years ago

ghost commented 3 years ago

I was very pleased to see this example. I like tapping caps lock for escape, but when I hold down, I want to map it to "hyper" (shift+control+option+command), but naively replacing :left_control with :!! or :CTOS did not work for me.

I'm sure there is something simple I'm missing, and any help is appreciated!

Vermoot commented 3 years ago

You can replace :left_control with :!CTOshift and it'll work, I believe. Modifiers shorthand doesn't work by itself.

AmmarCodes commented 1 year ago

In case someone else stumbled upon this, it could be done with:

{
  :des "caps_lock to escape when tapped and to Hyperkey when held"
  :rules [[:##caps_lock :!CTOleft_shift nil {:alone :escape}]]
}