Microsoft All-in-One Media Keyboard

Hi have this keyboard and I have to say I like it a lot... with some issues.

First of all, Volume and Mute keys are not working under FreeBSD. Second issue, you have to press the Fn key to have access to the function keys, otherwise the "Multimedia" features get the priority. Does anyone have experience with this device on 14.2 ?

Some details below.

Code:
[09:59][fmc000@tu45b-freebsd ~] $ grep hid /boot/loader.conf
hw.usb.usbhid.enable="1"
[10:03][fmc000@tu45b-freebsd ~] $

[10:03][fmc000@tu45b-freebsd ~] $ usbconfig|grep Microsoft
ugen1.4: <Wireless keyboard (All-in-One-Media) Microsoft Corp.> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
[10:03][fmc000@tu45b-freebsd ~] $

[10:03][fmc000@tu45b-freebsd ~] $ dmesg|grep Microsoft
ugen1.4: <Microsoft Microsoft Nano Transceiver v2.0> at usbus1
usbhid0: <Microsoft Microsoft Nano Transceiver v2.0, class 0/0, rev 2.00/9.44, addr 3> on usbus1
hkbd0: <Microsoft Microsoft Nano Transceiver v2.0 Keyboard> on hidbus0
usbhid1: <Microsoft Microsoft Nano Transceiver v2.0, class 0/0, rev 2.00/9.44, addr 3> on usbus1
hms0: <Microsoft Microsoft Nano Transceiver v2.0 Mouse> on hidbus1
hcons0: <Microsoft Microsoft Nano Transceiver v2.0 Consumer Control> on hidbus1
usbhid2: <Microsoft Microsoft Nano Transceiver v2.0, class 0/0, rev 2.00/9.44, addr 3> on usbus1
hcons1: <Microsoft Microsoft Nano Transceiver v2.0 Consumer Control> on hidbus2
hsctrl0: <Microsoft Microsoft Nano Transceiver v2.0 System Control> on hidbus2
[10:04][fmc000@tu45b-freebsd ~] $

[10:04][fmc000@tu45b-freebsd ~] $ grep hid /etc/sysctl.conf
hw.usb.usbhid.enable=1
[10:05][fmc000@tu45b-freebsd ~] $

 
I have to say I like it a lot... with some issues.
+1
I find it especially pleasant in a mobile sense; that is one can use it pretty much anywhere because wireless and light. Secondly you can plug the dongle in any PC/server and have a fully functional keyboard and mouse function at your disposal, even with just two hands operating it without any support if necessary.
If you're not always have the small rubber supports on a flat surface (e.g. lap use, as I'm typing ... ) be aware that they tend to disconnect themselves over time. If you're not a fan of replacing non-rechargeable battery sets when in continuous use, you may want to consider something like Panasonic Eneloop AAA's (previously Sanyo Eneloops).
Does anyone have experience with this device on 14.2 ?
Yes, but I haven't done any research in how to get all these MS specific stuff enabled on FreeBSD ->I'll be watching this thread :)
 
First of all, Volume and Mute keys are not working under FreeBSD.
Fighting with a keyboard under FreeBSD is always funny. I can't tell you what to do in your situation. I don't have such a keyboard from Microsoft.
I have a wireless keyboard. So... in Fedora Sway Spins all volume control keys work. That is, Fn + F2 / F3 / F4. The sound decreases / increases / shuts up perfectly. But on FreeBSD these key combinations do not work.
Although I use Pulsaudio and everything is written in the configuration file, in practice it does not work. But I can control the sound through commands.
$ pactl set-sink-volume @DEFAULT_SINK@ +10% --->increases
$ pactl set-sink-volume @DEFAULT_SINK@ -10% --->decreases
$ pactl set-sink-mute @DEFAULT_SINK@ toggle ---> MUTE

Why the function keys do not work is a mystery to me.
Thus, the electronics are normal, the keys are normal, the radio channel is normal. The commands work! That is, the sound control scheme itself works completely. What then? Write scripts in Python? As Fedora writes. Maybe you are in the same situation?

Do you have X / Wayland?
 
$ wev
Code:
[08:         wl_seat] name: seat0
[08:         wl_seat] capabilities: pointer keyboard
[10:    xdg_toplevel] configure: width: 0; height: 0
[09:     xdg_surface] configure: serial: 8502
[14:     wl_keyboard] keymap: format: 1 (xkb v1), size: 72682
[14:     wl_keyboard] repeat_info: rate: 30 keys/sec; delay: 300 ms
[14:     wl_keyboard] enter: serial: 8506; surface: 3
'                     sym: Return       (65293), utf8: '
[14:     wl_keyboard] modifiers: serial: 0; group: 0
                      depressed: 00000000
                      latched: 00000000
                      locked: 00000000
[11:  wl_data_device] data_offer: id: 4278190080
[4278190080:   wl_data_offer] offer: mime_type: text/plain;charset=utf-8
[4278190080:   wl_data_offer] offer: mime_type: UTF8_STRING
[4278190080:   wl_data_offer] offer: mime_type: COMPOUND_TEXT
[4278190080:   wl_data_offer] offer: mime_type: TEXT
[4278190080:   wl_data_offer] offer: mime_type: text/plain
[4278190080:   wl_data_offer] offer: mime_type: STRING
[4278190080:   wl_data_offer] offer: mime_type: SAVE_TARGETS
[11:  wl_data_device] selection: id: 4278190080
[10:    xdg_toplevel] configure: width: 956; height: 1026
                      activated tiled-left tiled-right tiled-top tiled-bottom
[09:     xdg_surface] configure: serial: 8503
[14:     wl_keyboard] key: serial: 8508; time: 17239196; key: 36; state: 0 (released)
                      sym: Return       (65293), utf8: ''
[14:     wl_keyboard] key: serial: 8509; time: 17243539; key: 10; state: 1 (pressed)
                      sym: 1            (49), utf8: '1'
[14:     wl_keyboard] key: serial: 8510; time: 17243572; key: 10; state: 0 (released)
                      sym: 1            (49), utf8: ''
[14:     wl_keyboard] key: serial: 8511; time: 17245507; key: 11; state: 1 (pressed)
                      sym: 2            (50), utf8: '2'
[14:     wl_keyboard] key: serial: 8512; time: 17245596; key: 11; state: 0 (released)
                      sym: 2            (50), utf8: ''
[14:     wl_keyboard] key: serial: 8513; time: 17248866; key: 68; state: 1 (pressed)
                      sym: F2           (65471), utf8: ''
[14:     wl_keyboard] key: serial: 8514; time: 17248963; key: 68; state: 0 (released)
                      sym: F2           (65471), utf8: ''
[14:     wl_keyboard] key: serial: 8515; time: 17249858; key: 69; state: 1 (pressed)
                      sym: F3           (65472), utf8: ''
[14:     wl_keyboard] key: serial: 8516; time: 17249931; key: 69; state: 0 (released)
                      sym: F3           (65472), utf8: ''
[14:     wl_keyboard] key: serial: 8517; time: 17251442; key: 70; state: 1 (pressed)
                      sym: F4           (65473), utf8: ''
[14:     wl_keyboard] key: serial: 8518; time: 17251571; key: 70; state: 0 (released)
                      sym: F4           (65473), utf8: ''
[14:     wl_keyboard] key: serial: 8519; time: 17257002; key: 50; state: 1 (pressed)
                      sym: Shift_L      (65505), utf8: ''
[14:     wl_keyboard] modifiers: serial: 0; group: 0
                      depressed: 00000001: Shift
                      latched: 00000000
                      locked: 00000000
[14:     wl_keyboard] key: serial: 8521; time: 17257283; key: 133; state: 1 (pressed)
                      sym: Super_L      (65515), utf8: ''
[14:     wl_keyboard] modifiers: serial: 0; group: 0
                      depressed: 00000041: Shift Mod4
                      latched: 00000000
                      locked: 00000000
[10:    xdg_toplevel] close
Now I'll reboot into Fedora. I'll see what the command will give me...
 
In Fedora wev works everything. That is, "F2/F3/F4" as in FreeBSD, and when you press "Fn+F2/F3/F4" everything works: decrease-increase-mute.
Fn key not working in FreeBSD? How to activate it? Test it?
 
In Fedora wev works everything. That is, "F2/F3/F4" as in FreeBSD, and when you press "Fn+F2/F3/F4" everything works: decrease-increase-mute.
Fn key not working in FreeBSD? How to activate it? Test it?
Fedora was so best in all linux system. but this guy always force you upgrade ...:)
 
The Fn button works in Inkscape (FreeBSD+Wayland+sway):
Fn + Home and Fn + End
work. That is, the (action + event) combination works here. But the combination on sound does not work.
 
How do they manage to pull off so many builds? Did they buy all the programmers?
i am new guys in freebsd , but i have used fedora 2 years. this system was profession and much more apps. one problem cause me going to freebsd. this guy always ask your to upgrade ...:(
 
FWIW, I verified that those multimedia keys are mapped as the standard 121,122,123 using a not-so-recent Linux livecd, so I don't think I have many options to follow, it's the kernel driver that does not see them.

I have to say that also the laptop's internal keyboard does not react to those keypresses, so it's not really a HID problem.
 
so it's not really a HID problem.
FreeBSD problem. The most basic thing doesn't work:
sudo sysrc -f /boot/loader.conf usbhid_load="YES"
sudo dmesg | grep uhid
This is an elementary operation. There is nothing at the output. It does not work.
What to do next?
 
# kldstat | grep uhid
Code:
14    1 0xffffffff837ad000     3360 uhid.ko
# dmesg | grep uhid
Exhaust - nothing.
# dmesg | grep usbhid
Code:
usbhid0 on uhub4
usbhid0: <Telink Wireless Receiver, class 0/0, rev 1.10/1.00, addr 3> on usbus2
hidbus0: <HID bus> on usbhid0
usbhid1 on uhub4
usbhid1: <HS6209 A4tech 2.4G Wireless Device, class 0/0, rev 2.00/2.00, addr 4> on usbus2
hidbus1: <HID bus> on usbhid1
usbhid0 on uhub4
usbhid0: <Telink Wireless Receiver, class 0/0, rev 1.10/1.00, addr 3> on usbus2
hidbus0: <HID bus> on usbhid0
usbhid1 on uhub4
usbhid1: <HS6209 A4tech 2.4G Wireless Device, class 0/0, rev 2.00/2.00, addr 4> on usbus2
hidbus1: <HID bus> on usbhid1

# ls /dev/ | grep usb
Code:
usb
usbctl
Where is my /dev/uhidX ?
 
FWIW, I verified that those multimedia keys are mapped as the standard 121,122,123 using a not-so-recent Linux livecd, so I don't think I have many options to follow, it's the kernel driver that does not see them.

I have to say that also the laptop's internal keyboard does not react to those keypresses, so it's not really a HID problem.
Based on Scan codes for keys, I used /misc/kbdscan and the "sound ON/OFF", "volume UP/DOWN" buttons on the left on my MS multimedia keyboard do not show using kbdscan; neither do the three buttons "HOME-icon", "HEADPHONE-icon" and "FOLDER-icon" above the trackpad by the way.

As mentioned in the quoted thread by _martin as well it sure looks to me like a deficiency somewhere in sys/dev/kbd and sys/dev/atkbdc. "Windows Multimedia Scan Codes:" are shown in:
 
The most annoying thing is that all this works out of the box even on the unofficial Ubuntu Sway Remix 24.04 LTS.
I'm just looking at what we're doing wrong.
So, yes, Linux is the most native for Wayland. Many experts wrote so here. And this is the wild truth.
 
The most annoying thing is that all this works out of the box even on the unofficial Ubuntu Sway Remix 24.04 LTS.
I'm just looking at what we're doing wrong.
So, yes, Linux is the most native for Wayland. Many experts wrote so here. And this is the wild truth.
Honestly, this is not a Wayland/Xorg thing. The kernel does not report any key activity, therefore we're failing much earlier than that.
 
fmc000 Coming back to this after a brief hiatus: perhaps the keyboard is waiting for an HID output report or something like that to enable the multimedia keys? When pressing the keys, are you able to discern any patterns in the raw USB packets from usbdump -d1.4 (assuming the bus/device is still ugen1.4)? This could help to determine if the keys are active at all.
 
fmc000 Coming back to this after a brief hiatus: perhaps the keyboard is waiting for an HID output report or something like that to enable the multimedia keys? When pressing the keys, are you able to discern any patterns in the raw USB packets from usbdump -d1.4 (assuming the bus/device is still ugen1.4)? This could help to determine if the keys are active at all.
This is the "usbdump -v -d 1.4" output I get when the multimedia buttons are used:

Code:
08:20:59.209635 usbus1.4 DONE-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=8,IVAL=1,ERR=0
 frame[0] READ 8 bytes
 0000  07 EA 00 00 00 01 00 00  -- -- -- -- -- -- -- --  |........        |
08:20:59.209660 usbus1.4 SUBM-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=0,IVAL=1
 frame[0] READ 32 bytes
08:20:59.210627 usbus1.4 DONE-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=4,IVAL=1,ERR=0
 frame[0] READ 3 bytes
 0000  21 00 0A -- -- -- -- --  -- -- -- -- -- -- -- --  |!..             |
08:20:59.210631 usbus1.4 SUBM-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=0,IVAL=1
 frame[0] READ 32 bytes
08:20:59.328628 usbus1.4 DONE-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=8,IVAL=1,ERR=0
 frame[0] READ 8 bytes
 0000  07 00 00 00 00 01 00 00  -- -- -- -- -- -- -- --  |........        |
08:20:59.328647 usbus1.4 SUBM-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=0,IVAL=1
 frame[0] READ 32 bytes
 
And a couple more ideas, not guaranteed to help:
multimedia/webcamd: contrary to the name, it's not just for webcams, but generally extends support for various USB devices (including input). I somehow doubt it supports the MS keyboard, thoigh.
– Also, perhaps check if x11-drivers/xf86-input-joystick is installed. Apparently, on Linux, it can cause problems with this keyboard: https://bbs.archlinux.org/viewtopic.php?id=221600.
If multimedia/webcamd is attached to 1.4 x11/wev does not report anything and I don't have x11-drivers/xf86-input-joystick installed on my system.
 
What exactly was it you were pressing? This first packet looks – speculatively – like it might be an output report for Volume Decrement from the Consumer HID Usage Page (keycode 0xEA): https://github.com/kaiwang27/uhidd/blob/master/uhidd/usb_hid_usages#L721.

Code:
08:20:59.209635 usbus1.4 DONE-INTR-EP=00000083,SPD=FULL,NFR=1,SLEN=8,IVAL=1,ERR=0
 frame[0] READ 8 bytes
 0000  07 EA 00 00 00 01 00 00  -- -- -- -- -- -- -- --  |........        |

Does anything happen if you bind sysutils/uhidd to ugen1.4? From the source, it looks as if it supports consumer (i.e. multimedia) key events. However, without such a device to hand, I can't verify this myself.

N.B. uhidd(8) is a userland daemon similar to bthidd(8), i.e., it processes USB input separately from the kernel driver and creates a virtual keyboard device, so you may need to disable the USBHID sysctl and/or unload modules to get it to work. It also requires CUSE.
 
Back
Top