Logitech K380 bluetooth keyboard - make function keys default

39,730

Solution 1

I created GitHub repository for k380 configuration program.

https://github.com/jergusg/k380-function-keys-conf

I did the same steps as Mario to get sequence for k380. The code is same as Mario's, but with the sequence for k380 keyboard and k380 device ID. It outputs write: 0 were written instead of 7 on my computer, but it works anyway.

The sequences are:

const char k380_seq_fkeys_on[]  = {0x10, 0xff, 0x0b, 0x1e, 0x00, 0x00, 0x00};
const char k380_seq_fkeys_off[] = {0x10, 0xff, 0x0b, 0x1e, 0x01, 0x00, 0x00};

Solution 2

Just an update, Logitech Options software can natively support the feature, Use F1 - F12 as standard function keys. See the picture below.

enter image description here

Solution 3

I like Jerguš's answer, but I don't want to compile c code.

Here is the equivalent one-line bash

echo -ne "\x10\xff\x0b\x1e\x00\x00\x00" | sudo tee /dev/[the device]

Even better, this can be automatized!

Create a file /etc/udev/rules.d/70-logi-k380.rules with the folloing line

ACTION=="add", SUBSYSTEM=="hidraw", KERNEL=="hidraw*", SUBSYSTEMS=="hid", KERNELS=="*:046D:B342.*", RUN+="/bin/bash -c \"echo -ne '\x10\xff\x0b\x1e\x00\x00\x00' > /dev/%k\""

Your keyboard will be fn-locked automatically.

Solution 4

I have exactly the same problem and also found the article about K810, which is:

http://www.trial-n-error.de/posts/2012/12/31/logitech-k810-keyboard-configurator/

I have already tried something similar to what Mario did with K810, but I am yet to find the proper sequence that needs to be sent to K380. In fact, it's something I don't quite understand from the article. I have already sent Mario a message asking how he figured out the exact sequence, but I don't have any reply yet.

In case someone else tries to figure it out, this seems to be the keyboard ID, at least in my case:

#define HID_DEVICE_ID_K380      (__s16)0xb342

vendor ID seems to be the same:

#define HID_VENDOR_ID_LOGITECH  (__u32)0x046d
Share:
39,730

Related videos on Youtube

Jerguš
Author by

Jerguš

Updated on September 18, 2022

Comments

  • Jerguš
    Jerguš over 1 year

    There is a software for Windows called "Logitech Options" which can switch media keys to function keys, but this setting is not remembered in keyboard. There are similar cases with other logitech keyboards already with solutions:

    But neither seems to work for K380. Has anyone figured out solution for this keyboard? It probably needs capturing communication between keyboard and Windows software, but it's quite complicated.

    • Ashhar Hasan
      Ashhar Hasan over 8 years
      Have you tried looking at the BIOS/UEFI settings? There is usually an entry called "Fn key mode" which determines the default behaviour of Fn keys.
    • MᴀʀɪᴜsᴢS
      MᴀʀɪᴜsᴢS over 8 years
      No, this function is only for internal keyboard. Required solution is like github.com/milgner/k290-fnkeyctl Logitech has software for windows for FN modifications, but we need to backport this to linux.
    • Ashhar Hasan
      Ashhar Hasan over 8 years
      @MariuzS Thanks for this piece of knowledge. ;)
    • zenhaeus
      zenhaeus over 8 years
      I was able to do this by using Solaar (github.com/pwr/Solaar). Your device does not seem to be on the list of supported devices (github.com/pwr/Solaar/blob/master/docs/devices.md), though you might still want to give it a try.
    • MᴀʀɪᴜsᴢS
      MᴀʀɪᴜsᴢS over 8 years
      Solaar is not working for me
    • Jerguš
      Jerguš over 8 years
      Solaar is not for bluetooth devices but for Logitech Unifying Receiver
  • mdm
    mdm over 8 years
    Awesome, it works for me, too! Thanks a lot!!!
  • NVaughan
    NVaughan over 5 years
    It worked perfectly for my k380 on Arch Linux.
  • thanhnha1103
    thanhnha1103 about 4 years
    Thank you. It's work like a charm.
  • Jerguš
    Jerguš almost 4 years
    System Requirements Supported Logitech device Windows® 10, Windows 8, and Windows 7 macOS™ 10.11 or above Logitech Flow requires computers that can connect to each other over a local network.
  • Anh-Thi DINH
    Anh-Thi DINH over 3 years
    It's work for me (K380 on Ubuntu 20.04)
  • Guerlando OCs
    Guerlando OCs about 3 years
    I installed this on a windows VM with an usb bluetooth passthrough, then selected the option to use f1-f12 as standard function keys, but this only works on the selected OS. If I switch back to my ubuntu profile it wont respect the selection
  • Admin
    Admin almost 2 years
    how do I get the [the device]?
  • Admin
    Admin almost 2 years
    @Chiptus ls /dev/hidraw* will list all hid devices. And grep -FH "HID_NAME" /sys/class/hidraw/hidraw*/device/uevent will tell you which one is your keyboard.
  • Admin
    Admin almost 2 years
    Thanks this was just so easy ..!!
  • Admin
    Admin almost 2 years
    echo -ne "\x10\xff\x0b\x1e\x00\x00\x00" | sudo tee /dev/[the device], it works on my keyboard, thank you so much.
  • Admin
    Admin almost 2 years
    Thanks @CHANist it works well. Link - logitech.com/en-us/software/options.html