Adjusting Chromebook Keyboard Mapping In Linux

As is usual with computery things, there are many ways to do this. But, this is my preferred method:

sudo touch /etc/udev/hwdb.d/61-keyboard.hwdb
sudo vim /etc/udev/hwdb.d/61-keyboard.hwdb
# Acer Chromebook 15
# Top row keys (between ESC and power button)
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGOOGLE*:pnAuron_Yuna:pvr*
# KEYBOARD_KEY_3b=back
# KEYBOARD_KEY_3c=forward
# KEYBOARD_KEY_3d=refresh
# KEYBOARD_KEY_3f=switchvideomode
 KEYBOARD_KEY_40=home
 KEYBOARD_KEY_41=end
 KEYBOARD_KEY_42=delete
 KEYBOARD_KEY_43=pageup
 KEYBOARD_KEY_44=pagedown
 KEYBOARD_KEY_db=search # Same position as caps lock key on most keyboards
# KEYBOARD_KEY_3e=fullscreen, no defined key sym

Obviously, you will want to adjust the svn and pn bits, as well as perhaps adjusting what the keys do to your own liking. You can find the correct vendor/part bits in dmidecode output:

sudo dmidecode |less

Then rebuild the hardware db and reboot:

sudo udevadm hwdb --update

Leave a Reply