Brightness control keybindings

superwow

I found that my brightness control keys did not work after installing VSIDO. According to the googles & reddits, this is a fluxbox thing. Openbox will readily map your power related keys automatically in most situations. Flux does not do this for you.

To get your brighness control keys to work, you could use the already installed xrandr. Go ahead, "man xrandr" on terminal, scroll down, yep, there it is, "--brightness". Yes, you can query and change your screen brightness on terminal with xrandr. It accepts absolute brightness values.


xrandr --output  --brightness 0.6


should set your brightness to 60%. For me this did not work. I went back to the manpage.

Reading on a bit, there's a blurb about hardware control keys. The man page says you probably want xbacklight. Familiar little app, I have installed it before in other distros.

Install xbacklight, then go edit your keybinding file. If you used xev like I did, it will tell you the key number of the screen dim and brighter keys. For me using the number in the keybinding file did not work. Using its name though did.


sudo apt-get install xbacklight
cp /home/superwow/.fluxbox/keys /home/superwow/.fluxbox/keys_default
medit /home/superwow/.fluxbox/keys


Medit will open the keys file. Here, you can drop in the keybindings I use. Or permutate them and repost here. Also, if anyone uses xrandr itself to change brightness, tell me what I did wrong.


# screen brightness
# keys: dim 232, bright 233
XF86MonBrightnessDown : Exec xbacklight -dec 10
Mod1 XF86MonBrightnessDown : Exec xbacklight -dec 3
Mod4 XF86MonBrightnessDown : Exec xbacklight -set 15
XF86MonBrightnessUp : Exec xbacklight -inc 10
Mod1 XF86MonBrightnessUp : Exec xbacklight -inc 3
Mod4 XF86MonBrightnessUp : Exec xbacklight -set 100