Skip to content

feat(Hardware Support): Add tap-to-click and L4/R4 for GPD Win Mini#510

Open
justinweiss wants to merge 4 commits intoShadowBlip:mainfrom
justinweiss:win-mini-trackpad
Open

feat(Hardware Support): Add tap-to-click and L4/R4 for GPD Win Mini#510
justinweiss wants to merge 4 commits intoShadowBlip:mainfrom
justinweiss:win-mini-trackpad

Conversation

@justinweiss
Copy link
Contributor

@justinweiss justinweiss commented Jan 31, 2026

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.

@justinweiss justinweiss marked this pull request as draft February 1, 2026 00:29
@justinweiss
Copy link
Contributor Author

justinweiss commented Feb 1, 2026

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.

@pastaq
Copy link
Contributor

pastaq commented Feb 1, 2026

Is L4/R4 on the same endpiont?

@justinweiss
Copy link
Contributor Author

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.

@pastaq
Copy link
Contributor

pastaq commented Feb 1, 2026

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.

Yeah, wwe can keep multiple drivers in the same subdir. See Go S as an example

L4/R4 actually work reasonably well today, but because they're weird macro buttons they
only work for tap, not hold.

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.

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.

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.

@justinweiss
Copy link
Contributor Author

justinweiss commented Feb 1, 2026

I recall we only need a 20ms release check to determine if it should be an up or down event.

Yep, it should just need a simple debounce.

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.

I tried the "Steam Deck Controller" target / PID with the same results:

  busctl call org.shadowblip.InputPlumber /org/shadowblip/InputPlumber/CompositeDevice0 org.shadowblip.Input.CompositeDevice SetTargetDevices as 3 deck mouse keyboard
[2026-02-01T21:14:21Z DEBUG inputplumber::input::target::steam_deck] Found Steam Deck target config: Valve Corporation Steam Controller PID: 4613

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.

@justinweiss
Copy link
Contributor Author

justinweiss commented Feb 2, 2026

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.

@pastaq
Copy link
Contributor

pastaq commented Feb 2, 2026

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.
@justinweiss justinweiss marked this pull request as ready for review February 3, 2026 05:04
@justinweiss justinweiss changed the title feat(Hardware Support): Add tap-to-click for GPD Win Mini feat(Hardware Support): Add tap-to-click and L4/R4 for GPD Win Mini Feb 3, 2026
Copy link
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@justinweiss
Copy link
Contributor Author

@pastaq I made two other small tweaks here. One to ignore some taps that were causing accidental clicks, and another to support drag.

@pastaq
Copy link
Contributor

pastaq commented Feb 7, 2026

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.

@justinweiss
Copy link
Contributor Author

Thanks, works well for me in both targets.

@pastaq
Copy link
Contributor

pastaq commented Feb 8, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

L4/R4 and trackpad for GPD Win Mini

2 participants