KarsMulder / evsieve

A utility for mapping events from Linux event devices.
GNU General Public License v2.0
199 stars 11 forks source link

Multi bouton support? #38

Open beudbeud opened 7 months ago

beudbeud commented 7 months ago

HI i wanna know if it's possible to make evsieve send to button press

I tried that but is not working

--map key:esc btn:base btn:select \

Can you tell me if there are way for doing it ?

Thanks

KarsMulder commented 6 months ago

Sorry for the late reply! I somehow missed the notification that a new issue was created.

Your code should work as-is; a map argument with three keys does indeed map the first specified key to both of the later keys.

So I suspect that the issue is not that the wrong events are getting generated, but that maybe the events are going to the wrong devices? Depending on the rest of the script, the result may be that you have a virtual keyboard device emitting btn:base and btn:select events, but that the program that you're trying to influence doesn't listen to keyboard devices, only to joysticks.

You could try the following to shadow both the keyboard and the joystick device, and write the button events to the joystick device:

evsieve --input /dev/input/by-id/keyboard domain=kb grab \
        --input /dev/input/by-id/joystick domain=js grab \
        --map key:esc@kb       btn:base@js btn:select@js \
        --output @kb \
        --output @js