Skip to content

Instantly share code, notes, and snippets.

@HappyCodingRobot
Created January 8, 2019 14:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HappyCodingRobot/df400e16d0615e98e2c1eee738925d0b to your computer and use it in GitHub Desktop.
Save HappyCodingRobot/df400e16d0615e98e2c1eee738925d0b to your computer and use it in GitHub Desktop.
Activate mic mute function key, ubuntu 18.04, HP Elitebook 820
# see also: /lib/udev/hwdb.d/60-keyboard.hwdb
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:pvr*
KEYBOARD_KEY_81=f20 # Fn+F8 on Elitebook, map to F20
# KEYBOARD_KEY_81=fn_esc # org entry
Problem: mic mute button (Fn+F8) does not work
Cause: mapped to wrong code (Fn+Esc)
Solve:
- create local .hwdb file with correct mapping in /etc/udev/hwdb.d/
- generate new /lib/udev/hwdb.bin file and reload it:
sudo udevadm -d hwdb --update; sudo udevadm -d control --reload; sudo udevadm trigger
# see:
# https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1535219
# https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1535219
# https://yulistic.gitlab.io/2017/12/linux-keymapping-with-udev-hwdb/
#
cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input3
U: Uniq=
H: Handlers=sysrq kbd event3 leds
B: PROP=0
B: EV=120013
B: KEY=20000 20000000020 0 0 1500f02100000 3803078f900d401 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7
sudo evtest /proc/input/event3
Event code 465 (KEY_FN_ESC)
..
Event: time 1546950805.062235, -------------- SYN_REPORT ------------
Event: time 1546950807.953693, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1546950807.953693, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 1
Event: time 1546950807.953693, -------------- SYN_REPORT ------------
Event: time 1546950808.116791, type 4 (EV_MSC), code 4 (MSC_SCAN), value 81
Event: time 1546950808.116791, type 1 (EV_KEY), code 465 (KEY_FN_ESC), value 0
sudo find /sys/ -name event3
: /sys/class/input/event3
: /sys/devices/platform/i8042/serio0/input/input3/event3
...
@Massimo-B
Copy link

Massimo-B commented Apr 19, 2022

G7

Did you get this solved on the G7? I can't get the mic-mute button working on the HP ZBook G8.
In the syslog I see:

[kernel] [24809.757040] atkbd serio0: Unknown key pressed (raw set 2, code 0xf6 on isa0060/serio0).
[kernel] [24809.757043] atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.
[kernel] [24809.822499] atkbd serio0: Unknown key released (raw set 2, code 0xf6 on isa0060/serio0).
[kernel] [24809.822502] atkbd serio0: Use 'setkeycodes e076 <keycode>' to make it known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment