kbct icon indicating copy to clipboard operation
kbct copied to clipboard

kbct can break gamepad support in Wine

Open felagund opened this issue 2 years ago • 1 comments

This is weird. I posted this in winehq first, where the post with resolution is awaiting approval: https://forum.winehq.org/viewtopic.php?f=8&t=36088

The problem is that when I run kbct with remapping active for four devices, like this: - keyboards: [ "ThinkPad Extra Buttons", "Logitech K800", "AT Translated Set 2 keyboard", "Logitech MX Vertical"]

Wine sees all of the virtual devices created as gamepads, so when I plug in my actual gamepad (xbox one or ipega one), probably due to some limitation to four gamepads in Wine/Windows, the actual gamepad is not seen. Using https://generalarcade.com/gamepadtool/ to check, it then looks like this: Screenshot_20220115_165706

When I restrict kbct to two devices, Wine starts to see the gamepad, but in-games most of its buttons are not recognized, it would look like this: Screenshot_20220115_165832

I am not sure if this is a Wine bug or something kbct is responsible for, but I thought it would be good to mention it here for anybody experiencing this after me.

felagund avatar Jan 15 '22 16:01 felagund

So this is not a Wine issue, AntiMicroX shows kbct devices as Gamepads too: file:///home/drew/Desktop/Screenshot_20220116_154327.png

I am not sure if this is a feature or not. When I run sudo evtest /dev/input/event0, I get:

Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x3 version 0x0
Input device name: "Sleep Button"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 142 (KEY_SLEEP)
Properties:
Testing ... (interrupt to exit)

ie. a list of keys this device (I think it is a virtual one that is emitted when I close the lid on my laptop) supports. When I do that for any of the kbct-created devices, I get a list of over 700 keys, including the gamepads buttons. I think that apps I usede above determine if a device is a keypad by asking if it emits certain keys.

The situation could probably be avoided if kbct-devices quried the original device for the keys it supports, changed them appropriately as configured and then passed only those as supported to the system (not usre if there is a config that would allow this now?)

felagund avatar Jan 16 '22 14:01 felagund