KVM Troubles with a QMK device

I have a QMK based macro pad (Nullbitsco Scramble) that I’m having a hell of time getting working through the HID ports on the level1techs KVM. Was hoping to use it as a keypad for control the KVM (macros hotkey combos to switch inputs, change USB follow behavior).

Using one of the HID ports directly the device powers on, but nothing seems to be getting passed through/recognized at all. If I use a powered USB hub connected to a HID port, with other HID devices attached, the KVM seems to flip out and reset that port (all devices disconnect/reconnect) when I plug in the Scramble.

I’ve configured QMK on it to be as stripped down as I can possibly think. Disabling NKRO, making sure mousekeys/extrakeys/console/etc are disable so only a single HID endpoint is advertised, tweaking USB sleep/wake behavior. Nothing seems to do it.

Chatting with Nullbitsco about it, it was brought up that maybe the device using a control that uses V-USB (software USB) instead of a hardware USB control might be playing into the problem.

Any thoughts?

1 Like

well, with nkro disabled, that should be all thats needed. I use qmk on a model m myself, which is fine, but based on the stm32.

what micro is in the device? I know the atmel implementation of soft-usb breaks a few things but I didn’t think anything “current” was still doing it that way since atmel added hardware usb facilities.

My Atmega328P won’t work at all in my iogear at all but my sonix and black pill based boards work just fine. All run qmk but I still don’t know why the Atmega won’t work…

So not all controllers are equal.

It’s the Nullbitsco Scramble, which uses the atmega328p too. It uses vusb instead of a hardware usb controller. That’s where I’ve been speculating the problem may lie as vusb is known to be really finicky. But haven’t been able to place exactly what about it may be causing the issues.

I have the Drop CTRL (SAMD51J18A) and Keychron Q3 (STM32L433) running QMK, and they were great with some tweaking around NKRO (actually use custom keycode functions to disable NKRO for a few seconds and run KVM commands, then re-enables NKRO).

You wouldn’t happen to have that code available for me steal from/be inspired by?

Defined a custom keycode KVM_TOG, created the following var/function:

bool saved_nkro_state;

uint32_t restore_nkro_state(uint32_t trigger_time, void *cb_arg) {
    clear_keyboard();
    keymap_config.nkro = saved_nkro_state;

    return 0;
}

Assigned the keycode to my keymap(s), then updated process_record_user() to handle the keycode as follows:

        case KVM_TOG:
            if (record->event.pressed) {
                // Get Current state
                saved_nkro_state = keymap_config.nkro;

                // Disable NKRO, type KVM_LEAD_CODE (SCRLCK x 2)
                clear_keyboard();
                keymap_config.nkro = false;
                SEND_STRING( SS_TAP(X_SLCK ) SS_DELAY(10) SS_TAP(X_SLCK ) );

                // Deferr resetting previous NKRO state
                defer_exec(2000, restore_nkro_state, NULL);
            }
            return false;
1 Like

I don’t suppose anyone has made any progress on figuring out why the Atmega328P doesn’t work with qmk and the level1 KVMs? This is the one thing that has been keeping me from using the roaming feature of the KM switch I have. The keyboard works okay if I plug it into one of the USB3 ports but I have to disconnect and reconnect the USB cable sometimes when switching hosts on the KVM and that is getting annoying =] I’ve tried the setup with other QMK keyboards and they all work great but my daily driver board runs an Atmega328P and I haven’t been able to get it to work =/