Linux, changing the default FN-key functionality in xorg (key-bindings?)

See the thread How to change Function (Fn) Key behavior on wireless Logitech keyboard.

It recommends using Solaar : A graphical utility that has the ability to configure the Fn key functionality on newer devices.

image


For other users who may stumble upon this question: Solaar didn't work with my (wired) Logitech K290, so I hacked together this small tool to restore the Fn-key-functionality to regular behaviour:

https://github.com/milgner/k290-fnkeyctl