sxhkd: super + key binding not working
Hardware: Lenovo Thinkpad laptop
When editing sxhkdrc like:
Super_L + f
firefox
makes f key to bind to firefox command, and the actual Super_L + f prints the “f” letter in the terminal.
I’m setting the key names according to what xev prints when I press the desired keys. The same error goes using super instead of Super_L
If I try to add a different key combo like Super_L + Return it happens the same; Return binds to whatever command I associate in the next line, and Super_L + Return executes return normally.
What can be causing this?
sxhkd version is 0.6.1
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 17
On starting/reloading
sxhkd: for those doing any keyboard layout changes I found it important that these are done beforesxhkdis started.On reloading
sxhkdI found that sendingsxhkdthe-USR1signal to reload wasn’t sufficient if keyboard layout changes have been made sincesxhkdwas first launched (say, withsetxkbmaporxmodmap) and wheresxhkdis maintaining the same PID since before the layout change. However, killing the process entirely and relaunching seems to fix it for me. That is, it has been sufficient for me to dopkill -x sxhkd && sxhkd &rather thanpkill -USR1 -x sxhkdafter making any keyboard layout changes. I’ve actually modified my config@0xPr0x an aside: xkb also has the option
-option altwin:swap_lalt_lwinor-option altwin:swap_alt_winso you can remove the dependency onxmodmapfrom your config 😃. For a full list see if you have/usr/share/X11/xkb/rules/base.lst.Super_L + fis not a valid chord: it’s formed by two keysyms!The manual defines the config syntax like so:
Notice that you can’t have a chord with two keysyms: you can only have chords with exactly one keysym and with any number of modifiers.
Some examples:
Super_Landfare both keysyms → ❎Super_L + fis an invalid hotkey (0m+2k);superis a modifier andfis a keysym → ☑️super + fis a valid hotkey (1m+1k);superis a modifier → ❎superis an invalid hotkey (1m+0k);Super_Lis a keysym → ☑️Super_Lis a valid hotkey (0m+1k).You are misusing
sxhkdtrying to bind something toSuper_L + f, so you should expect……to not work!
I’m having the same issue, keybinds work after restart but when I hot reload they stop working even after killing and running sxhkd again manually. I swapped my ALT and SUPER keys because I am running bspwm in a VM on a Windows host. I noticed you did the same and I believe that is the problem. As a test I disabled the config that remaps Super Alt and sxhkd works as expected.