HidHide
HidHide copied to clipboard
Feature request: Conditional filtering
So I have an interesting use-case where I have a DualSense plugged in and I'm filtering it so that only DS4Windows can see it and create a DualShock 4 controller. This is great for most situations, except for the part where Bluestacks 5 will also take input even when not in focus. Supposedly Bluestacks 5 will eventually bring back support for disabling gamepads, but it's unclear when this will happen.
In summary, I'd like to be able to do conditional filtering where one gamepad is blacklisted across all applications, while another gamepad is only blacklisted for certain applications.
I understand your use case but this request contradicts the current core design of the driver, I keep the request open but bear in mind this is no task of a few hours to implement but maybe even for an entirely new major revision.
I actually have another use-case for the same scenario.
I use vJoy + Joystick Gremlin for Star Citizen. However, Elden Ring just came out, and I've found it cannot see my gamepad. A little tinkering around showed that it basically only picks up the first controller, which is always going to be vjoy. As luck would have it, I can tell HidHide to hide vjoy and Elden Ring suddenly works. I'd use devreorder, but the game uses EasyAntiCheat, so that's no good.
I understand it's probably a lot of work to have a per-process blacklist/whitelist, but I could see this being useful for a number of games. Please consider it. Sadly I have scant experience with C++ and none at all with kernel driver development, so I doubt I can be any direct help.
So let's collect desired features for a rewrite then 😉
Off the top of my head, there would be the standard 'global' list of which devices are hidden from all programs. Then, you would be able to specify, per program, exceptions to the list. The specific overrides the global. E.g.
Global
T-Pedals: Hidden from all vJoy: Visible to all Xbox controller: Visible to all
\\?\path\to\joystickgremlin.exe
T-Pedals: visible vJoy: (Unset / Use global) Xbox controller: (Unset / Use global)
\\?\path\to\eldenring.exe
T-Pedals: (Unset / Use global) vJoy: hidden Xbox controller: (Unset / Use global)
As an aside, I thought of more examples this would be useful for last night. There's a great game called The Rift Breaker (real time Total Annihilation style base building, Factorio-ish resource gathering, from a Diablo perspective where you can fight and explore in a mech suit) that sadly picks up on input from vJoy + my pedals and tries to use it to control the mouse, forcing me to turn joystick gremlin off every time. And the 'listen to first input only' thing seems more common than you'd think.
I would find this very useful as well. I asked about writing .bat files to accomplish this exact thing in the discord a couple of days ago but by changing the cloaked controllers based on which application I was launching. Some sort of per application black list would be ideal. In the example above from dixonte, I would leave all the controllers visible on the global level, then hide them based on the local application that was running. I suspect a lot of people would find this useful, particularly if they play various kinds of sims as well as other video games.
I think it would be sufficient to offer a small commandline tool to instruct the driver so scripting can handle the conditional usage.
Example:
Say each device and app was given a UID (e.g. Devices = D001 ... D023 and Apps = A001 ... A128).
Then the cli syntax could be something like this:
hidhidecli -enable -app A067 -deny all -allow D001,D002,D004,D005
In this example, the driver is being instructed to enable device hiding, deny everything that is not explicitly specified, and specifically allow App UID A067 to see Device IDs D001, D002, D004, and D005.
From there, you'd set up batch files or ahk scripts that run a command like the example above before the app is run, watches for the app to close, and then runs something like hidhidecli -disable
to disable device hiding. or -default
to return to a preconfigured default state (if such a thing exists).
Helper arguments like -list app,dev -nodisconnected
could be offered to spit out a list of defined apps and all currently connected devices with their respective UIDs.
This approach removes considerable complexity from the driver itself. It just needs to know about the devices and the apps so it can assign ID#s to them and obey instructions from hidhidecli.
It provides the greatest amount of flexibility to users who need this (like me!), hopefully without requiring a driver rewrite.
HidHide already ships a CLI for this exact reason, to go haywire with scripting 😛
Nice! Chalk this one up to as-of-yet unwritten CLI documentation then, I suppose. :)
- you're utmost welcome to contribute documentation or
- wait for me to do it once I got the time in circa ~2023+ 😛
Oh that wasn't a critique. Documentation is always lowest priority, I totally get it. :)
Not seen as critique, just pointing out the obvious that my projects are excruciatingly understaffed and I'm booked till the end of the year 😉
If I get to the point of relative fluency with HidHide required to write docs of any kind of quality, I'll definitely submit a pull request. :) At the moment though, I'm still at the "how come this damn game still doesn't do what I expect it to do" stage. sigh
It's by no means and easy undertaking, there's so much to document, so little time... 😐
Rather than cluttering up this poor feature request issue, is there a good place for Q&A for CLI usage?
This will never make it with the current lack of maintenance involvement, so closing.