How to change Function (Fn) Key behavior on wireless Logitech keyboard
Solution 1
Solaar is a graphical utility that has the ability to configure the Fn key functionality on newer devices:
Since Ubuntu 15.04 (Vivid), Solaar can be installed from the repositories (sudo apt-get install solaar
). After installation, you can search for Solaar in the applications menu and start it from there.
A command line interface is also available. Example usage:
$ solaar show
...
2: Wireless Illuminated Keyboard K800
...
$ solaar config 2
fn-swap = False
$ solaar config 2 fn-swap on
fn-swap = True
Note that these settings are not persistent, you will loose it after reboot. This may change in future versions of Solaar.
I have previously created the ltunify
tool which is a Unifying tool that is able to communicate in the older HID++ 1.0 protocol. Until the next version of Solaar is released (current version is 0.8.7), you can use ltunify
to toggle the Fn key on an older device such as the K800 keyboard.
Installation instructions (taken from https://askubuntu.com/a/114089/6969):
sudo apt-get install git gcc
git clone https://git.lekensteyn.nl/ltunify.git -b fkeyswap
cd ltunify
make install-home
The command ltunify fkeyswap
shows the current status:
$ sudo ltunify fkeyswap
F key functions are not swapped
To swap the functionality, run ltunify fkeyswap on
:
$ sudo ltunify fkeyswap on
F key functions are now swapped
There is also an off
action:
$ sudo ltunify fkeyswap off
F key functions are now normal
Please leave a comment if it does not work so it can be fixed. The above functionality uses undocumented hardware registers.
Solution 2
You no longer need a ppa
to install this in Ubuntu 15.08 wily. Just type
sudo apt-get install solaar
at the command line.
Additionally, if you are using Unity or Gnome Shell, you can use the following command instead:
sudo apt-get install solaar-gnome
Solution 3
For wired keyboard like k290 use https://github.com/milgner/k290-fnkeyctl and execute command
/usr/local/sbin/k290_fnkeyctl
Related videos on Youtube
Comments
-
pim over 1 year
I do have a wireless Logitech K750 keyboard (silver Mac version) connected to a Lenovo ThinkPad (via the unifying USB receiver, together with a wireless Logitech mouse M705) and currently running Ubuntu 12.04.
By default the F-keys are mapped as multimedia/function keys, e.g. Play /Pause. As I don't use them very often, I want the F-keys to behave like the "real" F-keys (F1-F12). How can I do that?
I know there is an option in the BIOS settings, but this only toggles the built-in keyboard of the notebook, not on my wireless keyboard.
I know there is a way to change this for the Apple wireless keyboard (AppleKeyboard#Change_Function_Key_behavior), but there is no "parameters" directory in /sys/module/hid_logitech_dj/.
Any ideas? Or is there maybe a way to do this in a later Ubuntu version (13.04)?
UPDATE:
lsusb -d 046d:
showsBus 002 Device 005: ID 046d:c52b Logitech, Inc. Unifying Receiver
UPDATE 2: Thanks a lot for your help Lekensteyn. Finally Solaar works just fine. In the "Known Issues" of Solaar it says that it does not work with the Nano Receiver. But I have one and it works just fine. Just don't forget to read the installation instructions and run the
rules.d/install.sh
script. It also recognized my M705 Mouse.-
Admin about 11 yearsI just found github.com/pwr/Solaar, it looks like it able to toggle FN keys.
-
Admin about 11 yearsAccording to the lsusb output, you really have a Unifying device, not a nano receiver. Do you see the Unifying icon on the receiver?
-
-
Jacob Vlijm almost 10 yearsWhile this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
-
MᴀʀɪᴜsᴢS almost 10 yearsthis is link to program for doing this, use this program for swap FN keys.
-
Toan Nguyen over 8 yearsThis work for K290 Keyboard on Ubuntu Vivid 15/04
-
Michal Vician about 7 yearsI tried
ltunify
as you described, but the commandsudo ltunify fkeyswap
outputs this message:Unable to check fkey status
. I checked that the devices is correctly connected and paired. -
Lekensteyn about 7 years@MichalVician Newer devices use a different protocol version, try Solaar instead to control the FN keys. If the
solaar
package from the repos does not work, try the master branch which has many more fixes and features. -
erjoalgo almost 4 yearssolaar installed via pip (not the debian-packaged version) worked for me with the "K400 Plus" model. example:
solaar config 1 fn-swap off
. -
Tom Wyllie almost 4 yearsStill works for a K290 on Focal 20.04
-
groovenectar over 3 yearsThis software worked perfectly on Linux Mint 20 from the repository. Many thanks!!!
-
Mauricio over 2 yearsWorks perfectly with K400+ and Ubuntu 20.04 LTS. It required solaar package only. Open solaar with usb receiver unplugged. Plug it in. Use "Swap Fx function". Ready.