feat(Hardware Support): Add tap-to-click and L4/R4 for GPD Win Mini#510
feat(Hardware Support): Add tap-to-click and L4/R4 for GPD Win Mini#510justinweiss wants to merge 4 commits intoShadowBlip:mainfrom
Conversation
Partially addresses ShadowBlip#157
|
Moving this back to draft -- the trackpad clicks still appear in Steam's controller tester but don't actually work to click on anything in game mode with the deck_uhid target. The device just vibrates like the Steam Deck does with haptic clicks. The events look like they come through correctly and do work in desktop mode (as well as big picture in desktop mode), but I wouldn't want this merged until I understand why it's not working. |
|
Is L4/R4 on the same endpiont? |
|
No, L4/R4 are hidraw1 and trackpad is hidraw3. I was mostly just asking because it would change how I name some of these files if they were combined. L4/R4 actually work reasonably well today, but because they're weird macro buttons they only work for tap, not hold. I also did some more experimentation with the tap-to-click -- it works fine if it uses the InputPlumber Touchpad target but doesn't work with the steam_deck_uhid target. I assume the OrangePi and Legion Go do work, though, so it's probably just a matter of figuring out how to get this driver to send the same things in the same order. |
Yeah, wwe can keep multiple drivers in the same subdir. See Go S as an example
I recall we only need a 20ms release check to determine if it should be an up or down event. I think that is all detailed in #157.
That might be how steam is interpreting the generic target right now. If you change the vchi deck target to use the physical deck device PID it might have better results. That would only be for testing though, we don't want to annoy Valve. Once we know it "works" we can wait for them to implement the target. I usually do this while adding a new touch capable device. You'll need to use the "deck" target. |
Yep, it should just need a simple debounce.
I tried the "Steam Deck Controller" target / PID with the same results: Do you know if it still works with either deck target for OrangePi / Legion Go? I've tried some tests to replicate the order and types of those events that should be sent those devices with no change in results. So I haven't been able to figure out why those would work and this one wouldn't, since we have full control of the target device to emit the same pattern of events. The Steam controller tester shows the clicks, they just have no impact in the game mode UI or in-game. |
|
OK! This was a misunderstanding on my part 🙃 . After digging out my Deck and trying it out, I found out the mouse cursor isn't supposed to appear at all in game mode on the Deck / Steam Controller inputs, and that the default is to map right pad to joystick. Seeing the mouse cursor was confusing me into thinking it was supposed to click. Blocking the event* for the touchpad in the device yaml makes it work just like the Deck -- no cursor in game mode, no clicks in game mode, controller tester shows correct behavior, remapping right trackpad click to mouse click works fine in-game. I'll add that to this PR soon. |
Ah, yeah, that quirk has caused a lot of confusion. If you hold the guide button the trackpad switches to mouse mode |
Remaps macro keys to L4/R4 internally. Uses capability map to remap R4 to Quick Access, since the Win Mini doesn't have a dedicated Quick Access button. L4 is free for Steam Input or other mapping.
ee1e689 to
835168c
Compare
pastaq
left a comment
There was a problem hiding this comment.
This is great. It's been on my to-do list for far too long. Thanks!
Short movements can be misdetected as clicks. Taps should be ignored if the touch moves too far away from where it was initiated.
|
@pastaq I made two other small tweaks here. One to ignore some taps that were causing accidental clicks, and another to support drag. |
|
Looks good, just make sure it works well for the deck target and the touchpad target. They have different sensitivity for these kinds of things in my experience. |
|
Thanks, works well for me in both targets. |
|
Cool. We'll include this in the next version. I'm waiting on a review for the mouse events PR and some info from Valve. |
Adds a tap-to-click similar to the Legion Go and the OrangePi NEO.
Also debounces the macro keys and remaps them to L4/R4 internally. Then uses the capability map to remap R4 to Quick Access, since the Win Mini doesn't have a dedicated Quick Access button. L4 is free for Steam Input or other mapping.
Fixes #157.