User Tools

Site Tools


general:linux:fix_brightness_buttons_on_hp_elitebook_840_g3

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 ) &
general/linux/fix_brightness_buttons_on_hp_elitebook_840_g3.txt · Last modified: 2020/11/17 22:01 by sunkan

Donate Powered by PHP Valid HTML5 Valid CSS Run on Debian Driven by DokuWiki