Code Monkey home page Code Monkey logo

Comments (3)

rbreaves avatar rbreaves commented on June 8, 2024

I am using inotifywait in a bash script that restarts the xkeysnail service atm as a workaround, but it is a poor workaround that can result in stuck keys actually. May highlight an issue though, it'd be good to have xkeysnail release any potential keys or modifiers on startup, although xkeysnail has no systemd component natively.

from xkeysnail.

joshgoebel avatar joshgoebel commented on June 8, 2024

it'd be good to have xkeysnail release any potential keys or modifiers on startup

Interesting, I'd have assumed that when we die the virtual keyboard we created goes away and all it's keys with it... if keys are really being persisted across restarts I think you'd want to lift them both on shutdown AND startup.

I'm not sure if you can even query uinput for "which keys are currently down" though...

What type of glitches are you seeing exactly from stuck keys? Because once we're gone we aren't sending any more REPEAT events... so the only thing that might be persisted is the actual "PRESS" state inside uinput itself... I guess that could be enough to mess up modifiers... though really it's probably the user facing software persisting this state, not uinput itself... (which makes more sense)

In any case this should be fixed just by doing proper cleanup when asked to terminate... basically ask output to release all keys.

from xkeysnail.

joshgoebel avatar joshgoebel commented on June 8, 2024

Something like watching for SIG_TERM and doing proper cleanup:

joshgoebel/keyszer@c4591f8

Note I'm still not 100% clear on which signals are sent when, but this is the right approach me thinks.

from xkeysnail.

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.