root@asu-hp840:/etc/systemd/system# cat /usr/local/sbin/mapbrightnesskeys.sh #!/bin/sh setkeycodes e012 122 setkeycodes e017 123 root@asu-hp840:/etc/systemd/system# cat /etc/systemd/system/mapbrightnesskeys.service [Unit] Description=Map brigtness keys on HP EliteBook 840 G3 Before=graphical.target [Service] ExecStart=/usr/local/sbin/mapbrightnesskeys.sh [Install] WantedBy=graphical.target systemctl daemon-reload systemctl enable mapbrightnesskeys Then load Xmodmap automatically at login (delay needed for some reason) cat ~/.xmodmap keycode 130 = XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown NoSymbol XF86MonBrightnessDown keycode 131 = XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp NoSymbol XF86MonBrightnessUp sunkan@asu-hp840:~$ cat ~/.xsessionrc # Load mapped brigtness keys for HP EliteBook 840 G3 ( sleep 5; /usr/bin/xmodmap ~/.xmodmap ) &