Closed jettdc closed 1 year ago
Related issue: #20
This is possible on the main branch but not the latest stable version. You need to build evsieve from the main branch and then refer to your desired key as key:%300
or btn:%300
. The reason that this %
character is necessary is to avoid amiguities/inconsisencies like key:1
, which can already be interpreted as (EV_KEY, KEY_1)
.
sudo evsieve --input /dev/input/by-id/usb-GGG_GPWiz49-2-event-joystick grab=force persist=reopen \
--input /dev/input/by-id/usb-GGG_GPWiz49-event-joystick grab=force persist=reopen \
--map "key:%300" "key:up" \
--print \
--output name="joysticks" \
Thanks for the quick reply! Yeah, I was confused since I saw that functionality in the source code but couldn't get it to work on my machine. Didn't even occur to me that I didn't have the main branch built. Doh. I'll make sure to rebuild from main then.
My temporary workaround, just to throw it out there for anyone who may not want to/be able to use that functionality:
evtest /dev/input/by-id/joystick-x EV_KEY 300 \
| grep "300.*value" --line-buffered \
| grep --line-buffered -o "[01]$" \
| while read x ; do evemu-event /dev/input/eventX --type EV_KEY --code BTN_X --value $x ; done
Just monitors for those erroneous events, extracts the value from it, and emits a virtual event from the same joystick (or whatever device you want it to emit from I suppose)
I believe there is an issue when trying to process arbitrary event codes. I have a joystick controller which is sending a
1:300
(key:300
) event, and I believe because 300 is not a standard event code, issues are arising:Full script:
evtest
output:Any ideas for workarounds?