Snoothy / UCR

Universal Control Remapper [Alpha]
MIT License
834 stars 84 forks source link

Filter doesn't work when the affected button is already pressed #277

Open Treshcore opened 2 years ago

Treshcore commented 2 years ago

Hi! Probably, the heading is a bit confusing, so I'll try to explain it there. Also, I think that this problem is already solved, but I'd still like to ask it. And yeah, sorry if my text is way too huge.

So, I'd like to use UCR to replace the left Xbox 360 Gamepad stick - I like being able to slowly walk in video games, and sometimes they just don't provide me with that function on keyboard. I'd like to make it function like a trigger that works in combination with WASD - in my case, the trigger key is Alt (in future, just "trigger"). In other words, I'd like to work it like that: when I press trigger (and until I release it), WASD starts to emulate the left stick on it's 50/-50 angles on X and Y, making my character walk. The examples for this are default PC controls for GTA: San Andreas - I do it I kinda got what I wanted to achieve by adding a filter which toggles when I press the trigger, but...

The trouble is that when I press trigger when some of WASD keys is already pressed (trying to emulate left stick), it doesn't intercept the pressed signal (already sent by keyboard). Instead, it kinda blocks it, making my character infinitely run in some direction - until I release trigger and press that button normally. I see the roots of the problem, and it's pretty important. I want keyboard signal to be replaced by a virtual controller signal - without binding WASD to emulate left stick completely and simply change the angle by trigger. If I do this, the whole interfaces of many games will always "flick", showing keyboard buttons and Xbox 360/One buttons because, well, I'm always gonna use mouse and won't bind other buttons to replace keyboard buttons.

TL;DR: I need Button to Axis plugin, activated by filter, drop the signal, already sent by the same keyboard button that this plugin uses, and replace it with signal sent by the plugin itself.

In addition to my explanation, I'd love to attach a couple of screenshots, showing the trigger filter itself and W as the example of every of WASD buttons. Maybe it's unprofessional, but I do all the work on one profile, without child profiles. image image Not sure if there's anything more I can add here. Will be very thankful for any advices!