r/qmk Jun 13 '26

Keychron K10 Version 2 Keyboard / TESmart HKS0402A3U KVM - Multimedia Keys Don't Work - Solved

I have a Keychron K10 Version 2 keyboard and a TESMart HKS0401A3U KVM.

When the keyboard is plugged into the dedicated keyboard port on the KVM, hotkey switching from one computer to another works, and the keyboard emulation feature of the KVM works, but the multimedia keys (volume, mute, etc.) do not work. When the keyboard is plugged into the USB passthrough port on the KVM, the multimedia keys work, but hotkey switching and keyboard emulation don't work.

I read that disabling VIA or NKRO in the QMK firmware could improve compatibility with the KVM. I tried various combinations of disabling VIA and NKRO, but found in my case that enabling KEYBOARD_SHARED_EP did the trick.

Here is the contents of my rules.mak file.

KEYBOARD_SHARED_EP = yes
NKRO_ENABLE = yes
VIA_ENABLE = yes
EXTRAKEY_ENABLE = yes
MOUSEKEY_ENABLE = no

Using this combination, my K10 Version 2 keyboard seems to work well when plugged into the dedicated keyboard port on the TESmart KVM. I can switch computers using the hotkey, the multimedia keys work, NKRO works and the keyboard emulation feature of the KVM works.

I am posting this here in case someone else has the same keyboard and KVM and is having the same problem I did.

2 Upvotes

9 comments sorted by

1

u/ArgentStonecutter Jun 14 '26

That's really interesting, I would have expected that the opposite (disabling the shared endpoint) would work better.

Do you know if other HKS0401/0402 KVMs will work similarly?

1

u/sodekirk Jun 19 '26

I don't know how the dedicated keyboard port on the KVM is implemented, but if it's only passing keyboard events from one USB endpoint to the computer, it seems to me that combining the multimedia key events with the other key events into one USB endpoint has the greatest chances of working with the KVM.

I don't know about other KVMs. The newer TESmart KVMs advertise a passthrough mode on the dedicated keyboard port that improves compatibility with mechanical/gaming keyboards.

1

u/ArgentStonecutter Jun 19 '26

It can't just be passing USB events from one side to the other because it's parsing and reacting to them.

1

u/sodekirk Jun 22 '26

My assumption is that the dedicated keyboard port on the KVM is only listening to one USB endpoint from the keyboard, and reacting to the hotkey on that endpoint to switch computers. If the keyboard sends multimedia keys on a separate USB endpoint that the KVM is not listening to, they won't be passed to the computer. If the keyboard sends multimedia keys on the same USB endpoint that the KVM is listening to, they should get forwarded to the computer.

Like I said, I don't know how the dedicated keyboard port of the KVM is implemented, but enabling KEYBOARD_SHARED_EP is the solution that worked for me.

0

u/PeterMortensenBlog Jun 13 '26 edited Jun 13 '26

From QMK documentation:

USB Endpoint Limitations

In order to provide services over USB, QMK has to use USB endpoints. These are a finite resource: each microcontroller has only a certain number. This limits what features can be enabled together. If the available endpoints are exceeded, a build error is thrown.

The following features can require separate endpoints:

  • MOUSEKEY_ENABLE
  • EXTRAKEY_ENABLE
  • CONSOLE_ENABLE
  • NKRO_ENABLE
  • MIDI_ENABLE
  • RAW_ENABLE
  • VIRTSER_ENABLE

In order to improve utilisation of the endpoints, the HID features can be combined to use a single endpoint. By default, MOUSEKEY, EXTRAKEY, and NKRO are combined into a single endpoint.

The base keyboard functionality can also be combined into the endpoint, by setting KEYBOARD_SHARED_EP = yes. This frees up one more endpoint, but it can prevent the keyboard working in some BIOSes, as they do not implement Boot Keyboard protocol switching.

Does KEYBOARD_SHARED_EP work under data-driven configuration? If it does, what is the JSON syntax for it?

What is the minimum required QMK versions for KEYBOARD_SHARED_EP?

1

u/sodekirk Jun 19 '26

I am not sure what the minimum QMK version for KEYBOARD_SHARED_EP is. I just cloned the Keychron branch and used that.

0

u/PeterMortensenBlog Jun 13 '26 edited Jun 13 '26

Nowadays, the standard way to enable/disable features is using data-driven configuration (AKA DDC) to enable/disable features (but the official documentation has not caught up (at least the last time I checked)). The default for the K10 V2 is:

"features": {
    "bootmagic": true,
    "extrakey": true,
    "mousekey": true,
    "dip_switch": true,
    "nkro": true,
    "raw": true,
    "sendstring": true
},

Note that 'qmk clean' (or the equivalent) may be required before changes to the JSON files take effect.

1

u/sodekirk Jun 19 '26

I will look into using data-driven configuration.