Code Monkey home page Code Monkey logo

Comments (2)

KarsMulder avatar KarsMulder commented on June 12, 2024

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" \

from evsieve.

jettdc avatar jettdc commented on June 12, 2024

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)

from evsieve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.