waycrate / swhkd

Sxhkd clone for Wayland (works on TTY and X11 too)
https://git.sr.ht/~shinyzenith/swhkd
BSD 2-Clause "Simplified" License
679 stars 47 forks source link

Unable to use `super` key as a keysym #209

Open trueNAHO opened 1 year ago

trueNAHO commented 1 year ago

Version Information

Expected behavior

sxhkd distinguishes between modifiers and keysyms with the following general syntax:

HOTKEY
    [;]COMMAND

HOTKEY      := CHORD_1 ; CHORD_2 ; … ; CHORD_n
CHORD_i     := [MODIFIERS_i +] [~][@]KEYSYM_i
MODIFIERS_i := MODIFIER_i1 + MODIFIER_i2 + … + MODIFIER_ik

It is therefore impossible to trigger commands on modifiers without keysyms:

super
   <command>

Instead, the keysm equivalent super keys Super_L and Super_R must be used:

{Super_L,Super_R}
   {_,_}<command>

Unfortunately, after reading the entire swhkd documentation and looking at every currently existing issue, I am unable to find a way to use the super key as a keysym in swhkd:

super
    <command>

Although other special keys can be used like this, the super key is not one of them.

The reason I would like to use the super key as a keysym, is to enter modes with it. Without this functionality, I would be forced to resort to appending an arbitrary keysym as a workaround, which undermines the numerous ergonomic advantages of key chords and modes.

Since I don't know how complex or time-consuming this implementation might be, there is no need to feel rushed. But do keep in mind that this feature would bring immeasurable value towards fostering an ergonomic working environment.

Shinyzenith commented 1 year ago

This is a completely valid feature request but I wonder how we'd go about implementing this. I see https://github.com/waycrate/swhkd/issues/211 also exists which is in the same domain of feature requests so it is like that if we can get this issue resolved then https://github.com/waycrate/swhkd/issues/211 will also be resolved.