I thought such functionality comes with X11 itself, but as it turns out it comes with
xbindkeys, which is a X11-related program that is in category miscellaneous.
To get multimedia keys(volume, brightness) working, create ~/.xbindkeysrc. To get useful information(default file contents) on how the file is composed, call
# Decrease volume
"pactl set-sink-volume @DEFAULT_SINK@ -1000"
# Increase volume
"pactl set-sink-volume @DEFAULT_SINK@ +1000"
# Mute volume
"pactl set-sink-mute @DEFAULT_SINK@ toggle"
# Increase backlight
"xbacklight -inc 10"
# Decrease backlight
"xbacklight -dec 10"
xbindkeys to autostart. I added it to ~/.xinitrc
Keys like Play, Next are handled by your multimedia player.