yqrashawn / GokuRakuJoudo

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

modifiers support in layers definition #122

Open wljgo opened 3 years ago

wljgo commented 3 years ago

Hi,

seems that :modi if not supported in :layers the following is not properly translated

:layers { :mode {:key :tab :modi {:optional [:any]}} }

imkerberos commented 3 years ago

+1

gimbo commented 2 years ago

This would be handy. I had caps-lock mapping to hyper, but that meant I couldn't have rules triggered by holding down both caps-lock and shift (since shift is already "in" hyper). I thought I could get around this by making a layer, like so:

  :layers {
    :capslock-layer {:key :caps_lock :alone {:key :vk_none}}
  }

Then if I have a rule like:

        [:!Sleft_arrow "open /tmp" :capslock-layer]

then that works provided I hold down capslock first, but if I hold down shift first (which comes more naturally to me), it doesn't work because the layer doesn't get engaged.

(Edit: actually I'm not 100% sure that the proposed fix would meet my need, because maybe the shift doesn't make it through to the rule once the layer is engaged in that case? I haven't figured out what the karabiner config would need to look like to check this...)