Coder Social home page Coder Social logo

Comments (4)

TheGuardianWolf avatar TheGuardianWolf commented on May 28, 2024

The program doesn't currently support hold actions (or at least nothing I see in the source indicates that)

from naga_keypadmapper.

TheGuardianWolf avatar TheGuardianWolf commented on May 28, 2024

As a sidenote, I can pull to put in a toggle function potentially, but press and hold detection requires a restructuring of the program.

Edit: #43

from naga_keypadmapper.

apocatarsis avatar apocatarsis commented on May 28, 2024

@f0n1x Thank you!
@TheGuardianWolf You are right, the code is thought in such a manner that only instant press is possible. But everything is done with xdotool, so I think it is pretty easy to add this feature.
xdotool has the option "xdotool keydown/keyup [key]" (currently the flag key is used). So storing the current state of each key (up/down) and using this xdotool flag will do the trick probably.

Nice!

from naga_keypadmapper.

RaulPPelaez avatar RaulPPelaez commented on May 28, 2024

I merged your pull request @TheGuardianWolf, it did not compile as is but I think it should now be integrated with everything. Thank you very much!

It realized that this is actually simple to do even with the current code. The events read by the "select" function contain the type (which in this case will always be EV_KEY), and the code (1 for pressing, 0 for releasing). So the key operator should do keydown when this code is 1 and keyup when is 0.
I pushed a commit doing this. Now the key operator does exactly what OP asked, keep the key pressed until the side button is released. Just as pressing it in the keyboard.

Thank you both!

from naga_keypadmapper.

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.