Giter Site home page Giter Site logo

mtwebster / mouse-damper Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 19.77 MB

An attempt to use libevdev to dampen small pointer movements to help people with hand tremors

License: GNU General Public License v3.0

Python 89.48% Meson 10.52%
tremor shaking shake accessibility a11y libevdev evdev cython hand-tremors mouse

mouse-damper's Introduction

mouse-damper

This is an attempt to use libevdev to dampen certain pointer events to help people with hand tremors. I'm no expert, just someone who has to deal with this.

For people with a hand tremor it can be difficult to be precise with a mouse, particularly when trying to target and click or double-click elements on the screen - often an unintentional drag can be started, or the target missed on a double-click (where the initial click may have bumped the position enough to miss the intended target) - whatever the case, this is an attempt to cancel out some of these small, unintentional movements, while trying not to get in the way of normal movement and response when needed.

This is really really quite rough at the moment, no warranty. :)

How it works

The program will crawl /dev/input and gather up any mouse-type devices, and begin filtering them automatically. For now you can ctrl-c or kill the main process (it uses python multiprocessing for individual devices).

The toolkit libraries that graphical applications use (like GTK, QT) have some preventatives for unintentional mouse movement. They are of limited effectiveness, however, and do nothing to prevent mis-targeting on a button-release.

The way these issues are addressed by this program is the pointer is frozen in place when a button is pressed. At this point, two things begin to be tracked - elapsed time and physical mouse movement. The freeze is removed when one of the following three events takes place:

  • The user proceeds to complete a double-click (a click, release, and second click within a certain duration).
  • The double-click timeout is exceeded.
  • The physical mouse movement from the freeze point exceeds a configurable threshold. While this is by no means a perfect solution, it at least allows the user to act on their intended target, without being affected by uncontrollable physical movement.

mouse-damper's People

Contributors

mtwebster avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

aschaeffer

mouse-damper's Issues

Remove Nuitka Dependency?

FATAL: The Python version '3.11' is not supported by '1.3.5', but an upcoming release will add it.

Kudos for this project! We need mouse dampening / smoothing for other things, like reducing motion sickness caused by twitchy mouselook in games.

Will see what I can do. THANKS

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.