I want to set the caps lock key working as a modifier (modkey) and layout switcher at the same time.I want Caps Lock to act as a modkey in awesome in different hotkey combinations, for example, Caps Lock + Enter opens terminal and so on.When Caps Lock is pressed as a single key, it should act as a layout switcher on its release (by calling function that executes setxkbmap in rc.lua config).How can I accomplish that?I tried to turn Caps Lock into a modkey, but modkey = Lock in rc.lua does not seem to work right now, and after I finally made it work somehow (with xmodmap or changing the latter line in config), modkey was acting exactly the way Caps Lock acts: one press turnes it on, and another turns it off.Even if I make Caps Lock the modkey instead of Super_L, I still have no idea of how to handle its single-key release.
Configuring Caps Lock as modifier and layout switcher
x11;keyboard shortcuts;keyboard layout;awesome;xkb