1

I have installed Ubuntu MATE 22.04 and Kubuntu 23.04 on two Chromebooks with amd64 architecture.

The media keys are not working. I can change brightness from system settings, but the media keys are mapped to F1 - F10.

How to make the media keys work? Everything else works perfectly.


Note: The media keys work out of the box in GalliumOS, but it is based on Xubuntu 18.04, and is not being actively developed anymore. I want to use the latest LTS version of Ubuntu in my Chromebook.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212

1 Answers1

1

For recent (post 2020) Chromebooks that use the vivaldi driver, use the keyboard remapping script from the cros-keyboard-map repository by WeirdTreeThing.

git clone https://github.com/WeirdTreeThing/cros-keyboard-map
cd cros-keyboard-map
./install.sh

The rest of the answer is for chromebooks older than 2019.

Disclaimer: This answer is partly based on this Reddit post. See this answer for GNOME.

For Ubuntu 22.04 and later versions

In Ubuntu MATE, open keyboard settings, open the "Layouts" tab, and choose "Chromebook".

In Kubuntu, open System Settings -> Input Devices -> Keyboard, and choose Google | Chromebook as the layout.

enter image description here


For Ubuntu 20.04 and previous versions, the workaround is to use GalliumOS keyboard layout.

First, download the .deb file for the keyboard layout.

wget https://apt.galliumos.org/pool/main/x/xkeyboard-config/xkb-data_2.23.1-1ubuntu1-galliumos1_all.deb

Now, install it.

sudo apt install ./xkb-data_2.23.1-1ubuntu1-galliumos1_all.deb

The latest version of xkb-data already has a Chromebook layout, but it is not as good as the GalliumOS layout, because the key for lowering brightness does not work there.

Therefore, you have to pin this particular version, so that it would not be overwritten by an update.

sudo apt-mark hold xkb_data

Then, open keyboard settings, and open the "Layouts" tab.

enter image description here

Choose the layout titled "Chromebook (most models) | Right alt overlay | F keys mapped to media keys". Here, the alt key acts as the "overlay" key (similar to the Fn key in usual laptop keyboards).

Finally, reboot your computer.

For more details about the keyboard layout, checkout GalliumOS wiki.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212