-1

I'm trying to get my volume and brrightness keys to work using dwm. I put this into dwm/config.h: https://i.stack.imgur.com/ohhkq.png

And also this for the keybinds. https://i.stack.imgur.com/MwYWp.png

So far I've tried this in my command line

sudo make uninstall
sudo make install

Then I tried to do the same in root, but that didn't change anything either I also killed xsessions and booted everything up again and it still doesn't seem to be changing anything.

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298
J H
  • 17
  • 3

1 Answers1

1

You probably forgot to import XF86keysym. You can do that by pasting #include <X11/XF86keysym.h> on top of your file. I'm no C pro but I was able enabling my volume and brightness keys using this gist. After that import your keys will probably work.

If you are a laptop user and have no dedicated keys for sound/brightness you have to make sure your FN + F1-F12 (whatever your brightness/sound controls are) are reported as XF86XK_AudioLowerVolume, XF86XK_AudioMute, XF86XK_AudioRaiseVolume and their corresponding brightness XF86 codes. I did that myself using this post.

For checking your key clicks and what the codes are you can use utilities like showkey (hint: use showkey -a or sudo showkey -k). Or check this thread.

mercus
  • 11
  • 4