1

I have an Mx Keys keyboard with a Mac & Windows layout which I wanted to connect to my Dell XPS 9650 running Elementary OS 7 Horus.

First, I had trouble connecting it to my computer. The step by step solution was :

  1. Hold the pairing button of the keyboard ( A button resembling 1C⌑, 2C⌑ or 3C⌑ )
  2. Click on the Connect button at the far right
  3. Type in the digits shown in the displayed window
  4. Press Enter

Then however, many special functions behind the functions keys weren't working. One example was both of the monitor brightness buttons.

How do I fix the special function keys actions ?

1 Answer 1

2

I found a solution using Solaar. It is a Linux manager for many Logitech devices

The installation documentation can be found here. I personnally chose to use pip to install the latest release of Solaar.

pip install --user solaar

After the installation process is complete, make sure you copied the udev rules as indicated in the documentation.

# user udev rules
sudo cp ~/.local/share/solaar/udev-rules.d/42-logitech-unify-permissions.rules /usr/lib/udev/rules.d/

# system udev rules
sudo cp ~/.local/share/solaar/udev-rules.d/42-logitech-unify-permissions.rules /etc/udev/rules.d/

You might have to disconnect your devices for Solaar to recognise them. If you run Solaar and you haven't disconnected / reconnected your devices, the Logitech devices manager will probably tell you to do so

However, the special function keys were still not working !

I found two ways to mitigate this :

Solution 1 : Key/Button Diversion

( my personal preference )

  • Open Solaar
  • Click on your keyboard in the list of devices
  • Unlock the Key/Button Diversion setting ( press the padlock twice )
  • Divert all key/button(s) you wish to redefine. Here is a list of those :
Brightness Down, Brightness Up, Mission Control/Task View, Calculator
  • Edit rules to redefine the keys above To make it easier, here are the rules I used to configure those keys:
# ~/.config/solaar/rules.yaml
%YAML 1.3
---
- Key: [Mission Control/Task View, pressed]
- Execute: [/usr/bin/dbus-send, --session, --dest=org.pantheon.gala, --print-reply,
    /org/pantheon/gala, org.pantheon.gala.PerformAction, 'int32:1']
...
---
- Key: [Calculator, pressed]
- Execute: [/usr/bin/flatpak, run, io.elementary.calculator]
...

Note that the brightness up and down keys are configured by default by Solaar, thus not showing up in the snippet above.

Here is a link to my Solaar configuration that you can fetch if you want to bother with the diversion and configuration step : https://github.com/alexandre-eliot/elementary-os-solaar-mx-keys-config

Solution 2 : Set OS as Mac OS

  • Open Solaar
  • Click on your keyboard in the list of devices
  • Unlock the Set OS setting ( press the padlock twice )
  • Select Mac OS in the list
  • Press the padlock again to lock it again

Note that, after this step, some keys may differ from the printed characters of your keyboard. For me the [@#|²~] key was swapped with the > < key.

Also, you will have use the opt|ctrl key instead of the ⌘cmd|alt(gr) to trigger the encircled symbols.

Bonus:

  • You may want to run Solaar on Start-Up. The procedure to do so can be found here.

  • Solaar will allow you to define actions linked to key presses and other events.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.