Open tomatosoupcan opened 1 year ago
Does this happen if you use JOYSTICK_SHARED_EP=no
(either in your rules.mk, or from the command line?
This looks like some annoying Windows behavior — I was able to reproduce it with Windows 11 22H2 (22621.1702) and two different onekey firmwares:
qmk flash -kb handwired/onekey/promicro -km joystick -e VIA_ENABLE=yes
qmk flash -kb handwired/onekey/promicro -km joystick
If you flash the VIA-enabled firmware first and connect the device to a machine which had never seen that USB VID:PID pair before, joy.cpl
is able to show the joystick axes and buttons. When you flash a non-VIA firmware and connect the device to the same machine, joy.cpl
still shows axes and buttons correctly. However, if after doing that you flash the VIA-enabled firmware again, joy.cpl
shows just an empty window instead of axes and buttons — so just connecting the device with non-VIA firmware once is enough to break things for the VIA-enabled firmware, even if the VIA-enabled firmware was used first.
What is really annoying is that even deleting the device from the Devices page in Settings or manually removing all related entries in the Device Manager does not fix the problem — after reconnecting the device with a VIA-enabled firmware joy.cpl
still shows an empty window.
What does help is going to the HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput
registry key and removing the subkey for the VID:PID pair which matches the problematic device (VID_FEED&PID_6465
for the onekey firmware, should be VID_7272&PID_0C2C
for rominronin/katana60/rev1
). The subkey gets repopulated when you open joy.cpl
the next time, and then the joystick axes and buttons are shown again, until you break it by connecting a device with the same VID:PID, but a different firmware configuration. You will lose any calibration data though (apparently they are stored under that subkey).
https://github.com/WootingKb/wootility-issues/issues/31 suggested clearing even more registry keys:
HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaProperties\PrivateProperties\DirectInput\VID_xxxx&PID_yyyy
HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaResources\Joystick\DINPUT.DLL\JoystickSettings\VID_xxxx&PID_yyyy
HKEY_CURRENT_USER\System\CurrentControlSet\Control\MediaResources\Joystick\DINPUT.DLL\CurrentJoystickSettings
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MediaProperties\PrivateProperties\Joystick\OEM\VID_xxxx&PID_yyyy
Describe the Bug
When setting both
VIA_ENABLE = yes
andJOYSTICK_ENABLE = yes
in
rules.mk
VIA works as expected, however, the joystick is detected but not setup properly.
With VIA disabled, the joystick shows up and functions as expected.
Confirmed against multiple Windows environments, and have confirmed that this behavior is not specific to only my device.
Keyboard Used
katana60/rev1
Link to product page (if applicable)
No response
Operating System
Windows
qmk doctor Output
Is AutoHotKey / Karabiner installed
Other keyboard-related software installed
No response
Additional Context
No response