sxhkd
sxhkd copied to clipboard
Xorg bindcodes
How can I bind a bindcode to a command with sxhkd? I was able to do this fairly easily with i3, but after switching to sxhkd and bspwm, I'm unable to find a way to do this. I have several buttons on my laptop keyboard that are only usable with bindcodes, not by name. I'd appreciate some help on this.
If you are referring to keys such as Volume Up
and Volume Down
, then you can run xev
in a terminal, press the keys you are referring to, and watch the output of xev
for the name of the key. For example, when I hit the "volume down" key on my laptop, xev
says:
KeyRelease event, serial 30, synthetic NO, window 0xd000001,
root 0x1e5, subw 0x402f8f, time 312381508, (165,232), root:(1607,786),
state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
You can see in the output that the name of the key is XF86AudioLowerVolume
. You can use the XF86 key names in sxhkd
like any other keys.
I think this is related to #216, and there's already a PR in progress to have that functionality.