9

I'm trying to enable some multimedia keys, and the ones for volume do work. F5 and F6, the ones for increasing/decreasing do not work, I do not know why. When I run in the terminal:

xbacklight +10

I can see the working effect. When I try my binded special keys (which are set to ~/.config/i3/config):

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness

Obviously, the media keys must be combined with the fn key. However, I don't see the effect. Any solutions?

  • Are you sure the key symbols are XF86MonBrightness(Up|Down)? As in: "Did you check with xev?" While these key symbols do exist, there are also XF86KbdBrightness(Up|Down). – Adaephon Nov 14 '16 at 21:21
  • I have this problem also, supposedly you are meant to discover the keys using xmodmap -pke and then somehow apply these in the i3 config. – warsong Aug 29 '17 at 16:16
3

This is an old question, but an answer may help out others. I ran into an issue upon a fresh installation of i3wm on my laptop where, for whatever reason, my XF86MonBrightnessUp/Down keys weren't being registered (I checked with xev). What I ended up doing is creating acpi actions and events which corresponded to the keys being pressed.

The following are the actions/events I defined in /etc/acpi/actions and /etc/acpi/events, respectively:

Actions

/etc/acpi/actions/bl-down.sh

#!/bin/sh

bl_device=/sys/class/backlight/acpi_video0/brightness
echo $(($(cat $bl_device)-1)) | sudo tee $bl_device

/etc/acpi/actions/bl-up.sh

#!/bin/sh

bl_device=/sys/class/backlight/acpi_video0/brightness
echo $(($(cat $bl_device)+1)) | sudo tee $bl_device

Events

/etc/acpi/events/bl-down

event=video/brightnessdown BRTDN 00000087 00000000
action=/etc/acpi/actions/bl-down.sh

/etc/acpi/events/bl-up

event=video/brightnessup BRTUP 00000086 00000000
action=/etc/acpi/actions/bl-up.sh

You can verify your brightnessup/down acpi event codes by using acpi_listen in your terminal and then pressing the relevant key combination (e.g., for me, it's Fn + Down Arrow for brightness down).

Finally, don't forget to restart acpid with sudo /etc/init.d/acpid reload

Note: Your backlight device may be defined in a different location than /sys/class/backlight/acpi_video0 - that's just where mine happened to be. Do some poking around.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.