- Logitech K380 bluetooth keyboard — make function keys default
- 5 Answers 5
- Even better, this can be automatized!
- sergshabal / logitech k480 bluetooth in linux
- enter pairing mode on the keyboard
- I think now I had to enter the displayed pin on the bluetooth keyboard and press enter
- Footer
- Pairing LOGITECH K380 in Ubuntu 20.04
- 1 Answer 1
- 20.04 — Logitech MX Keys won’t pair with Bluetooth
Logitech K380 bluetooth keyboard — make function keys default
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.
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.
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.
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.
5 Answers 5
I created GitHub repository for k380 configuration program.
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.
const char k380_seq_fkeys_on[] = ; const char k380_seq_fkeys_off[] = ;
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.
@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.
Just an update, Logitech Options software can natively support the feature, Use F1 — F12 as standard function keys . See the picture below.
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.
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
I have exactly the same problem and also found the article about K810, which is:
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
sergshabal / logitech k480 bluetooth in linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
its ok |
I set keyboard in paired mod |
then in terminal: |
$ bluetoothctl |
[NEW] Controller 00:02:72:DE:1E:41 debi [default] |
[NEW] Device 00:1F:20:EC:A5:DD Logitech Keyboard K480 |
[NEW] Device 00:1A:7D:55:02:06 BS-55 |
[NEW] Device A0:8D:16:86:81:C1 CHM-U01 |
[bluetooth]# connect 00:1F:20:EC:A5:DD |
[bluetooth]# trust 00:1F:20:EC:A5:DD |
[bluetooth]# quit |
thats all |
it work |
As a workaround I managed to pair successfully following the instruction in the «Pairing process» section at
https://wiki.archlinux.org/index.php/Bluetooth_keyboard
i.e.
sudo bluetoothctl -a
power on
agent KeyboardOnly
default-agent
pairable on
enter pairing mode on the keyboard
scan on
pair MAC_OF_THE_KEABOARD_FROM_PREVIOUS_STEP
I think now I had to enter the displayed pin on the bluetooth keyboard and press enter
trust MAC.
connect MAC.
quit
The keyboard stays connected even after the system restart.
I’ve connected using the MacOS mode from the keyboard w/o going through all of these steps.
Although, I did go through the following steps and then I gave up and tried connecting the keyboard using MacOS mode:
After the above 2 steps, I’ve used the Ubuntu [18.04] UI to connect my Logitech K480 Keyboard using MacOS mode.
worked with Ubuntu 21.04 in macOS mode out of the box without the need of any extra packages
Works,thanks!
Used hcitool scan to get MAC-address of bluetooth keyboard
Footer
You can’t perform that action at this time.
Pairing LOGITECH K380 in Ubuntu 20.04
I connected to my new K380 without the pairing process using bluetooth manager. After that, using for some time, I notice that the keyboard was not answering anymore, and I’ve always to reconnect it to have it working. I’d like to know if there is a commandline way to get it paired, because the bluetooth manager says that there is a «Pairing problem with the device». I’m using Ubuntu 20.04 with a Dell Latitude e5450 and Intel Wireless 7265 (rev 59)
This worked for me on Ubuntu Mate + Logitech K380 keyboard. The GUI bluetooth tools on Ubuntu Mate didn’t show me the pairing code from the keyboard despite repeated pairing attempts. Doing it «manually» via bluetoothctl finally worked. Now the keyboard re-connects automatically. Thanks for your hard work.
1 Answer 1
The author of the question provided the following solution.
Install bluetoothctl if it is not already installed. In Ubuntu 20.04 it comes with the default install.
In terminal, run the command bluetoothctl :
$ bluetoothctl Agent registered
[MX Vertical]# agent on Agent is already registered
[MX Vertical]# scan on Discovery started [CHG] Controller DC:53:60:0E:0A:C8 Discovering: yes [CHG] Device 34:88:5D:EF:19:51 RSSI: -49 [CHG] Device 34:88:5D:EF:19:51 Class: 0x00002540 [CHG] Device 34:88:5D:EF:19:51 Icon: input-keyboard [CHG] Device 88:0F:10:87:00:F1 RSSI: -87
In this output, the MAC address of the keyboard is this one: 34:88:5D:EF:19:51. Copy it! Then stop the scan:
[MX Vertical]# scan off [CHG] Device 88:0F:10:87:00:F1 RSSI is nil [CHG] Device 34:88:5D:EF:19:51 RSSI is nil [CHG] Controller DC:53:60:0E:0A:C8 Discovering: no Discovery stopped
[MX Vertical]# trust 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Trusted: yes Changing 34:88:5D:EF:19:51 trust succeeded
And pair it. Now the passkey shown in terminal (300892 in this case) must be typed in keyboard, and after that an Enter should be pressed. It’ll looks like this:
[MX Vertical]# pair 34:88:5D:EF:19:51 Attempting to pair with 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Connected: yes [agent] Passkey: 300892 [agent] Passkey: 00892 [agent] Passkey: 0892 [agent] Passkey: 892 [agent] Passkey: 92 [agent] Passkey: 2 [agent] Passkey:
[CHG] Device 34:88:5D:EF:19:51 Modalias: usb:v046DpB342d4201 [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001000-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001124-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes [CHG] Device 34:88:5D:EF:19:51 Paired: yes Pairing successful [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: no [CHG] Device 34:88:5D:EF:19:51 Connected: no
[MX Vertical]# connect 34:88:5D:EF:19:51 Attempting to connect to 34:88:5D:EF:19:51 [CHG] Device 34:88:5D:EF:19:51 Connected: yes Connection successful [CHG] Device 34:88:5D:EF:19:51 ServicesResolved: yes
20.04 — Logitech MX Keys won’t pair with Bluetooth
I am using Ubuntu 20.04.1 and I am trying to pair my MX Keys keyboard via Bluetooth. I start the process with the Bluetooth control panel, and I get stuck in this window. Even though I type the right PIN and press ENTER, still the process does not complete. In fact, it gets stuck in that mode, with the PIN window unable to be closed. I have also tried using «Blueman» with a similar result. I start the «Setup» process, and this is what I get in the end. I have also tried with bluetoothctl
➜ bluetoothctl connect CB:DD:B4:5C:4E:E3 Attempting to connect to CB:DD:B4:5C:4E:E3 [CHG] Device CB:DD:B4:5C:4E:E3 Connected: yes Connection successful ~ took 8s ➜ bluetoothctl trust CB:DD:B4:5C:4E:E3 [CHG] Device CB:DD:B4:5C:4E:E3 Trusted: yes Changing CB:DD:B4:5C:4E:E3 trust succeeded ~ ➜ bluetoothctl pair CB:DD:B4:5C:4E:E3 Attempting to pair with CB:DD:B4:5C:4E:E3 [CHG] Device CB:DD:B4:5C:4E:E3 ServicesResolved: yes [CHG] Device CB:DD:B4:5C:4E:E3 ServicesResolved: no [CHG] Device CB:DD:B4:5C:4E:E3 Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled ~ took 30s
What could be done about it, to get it to work? UPDATE I have managed to get a PIN with bluetoothctl if I reset Bluetooth in my PC, but even if I type the PIN, the authentication fails. It is as if it was ignoring what I type.
[bluetooth]# pair CB:DD:B4:5C:4E:E3 Attempting to pair with CB:DD:B4:5C:4E:E3 [CHG] Device CB:DD:B4:5C:4E:E3 Connected: yes [agent] Passkey: 610148 [CHG] Device CB:DD:B4:5C:4E:E3 Connected: no Failed to pair: org.bluez.Error.AuthenticationCanceled