Skip to main content

Control your mouse with your keyboard through KeyFlare

Project description

KeyFlare

Downloads Website Code style: black

About

Some users prefer using a keyboard over a mouse because of accessibility needs or personal reasons. KeyFlare enables users to interactively control their mouse using their keyboard. Showcases available on my website. KeyFlare is open source, free, and both easy to understand and install.

Also, please check the documentation in github wiki!

An example image of KeyFlare in action Also used for testing and benchmarking.

Installation

Suggested:

pip install keyflare
keyflare

Alternative 1:

pip install -e git+https://github.com/pranitsh/keyflare.git@main#egg=keyflare --upgrade
  • The @main installs the main branch.
  • The #egg=keyflare makes sure to name the package keyflare
  • The --upgrade forces an update to the library if you had it installed already somehow through another package that depends on it or something else.
  • The -e means that the source code is installed too. The logging done when you run this line (normally the second line from the top) will show you where it is. You can then edit this source code for changes to propagate to the library. I do not often use this feature, but it is there for others if you want it.
pip install -e "git+https://github.com/pranitsh/keyflare.git@main#egg=keyflare[dev]" --upgrade
  • Add the quotation marks and the [dev] for the developer toolkit to come with it (including pytest, wheel, black, etc)

Alternative 2:

  • Use git clone https://github.com/pranitsh/keyflare.git to install the source code
  • Optional: create a virtual environment with python -m venv env and activate it as per your system
  • Install dependencies: pip install -r requirements.txt
  • Go to the KeyFlare root directory and run python keyflare, which will run the code in __main__.py automatically.

For macOS, both PyAutoGUI (which takes screenshots and moves the mouse) and pynput (which monitors keyboard for hotkey) do claim compatibility with macOS. However, there are some macOS-specific hoops you should be aware of:

  • pynput requires sudo keyflare and on macOS versions post-Mojave, you may need to whitelist your terminal application
  • PyAutoGUI requires users on El Capitan to run MACOSX_DEPLOYMENT_TARGET=10.11 pip install pyobjc

Inspiration

Vimium C, a common tool for users with accessibility needs for navigating web browsers, does not work on web browsers. Apple Voice Control's smart grid, a tool for navigating on Apple displays, does not work outside of an iPhone and would not be effective on large displays. There was no tool available for this, so I decided to make it.

Features

  • Intuitive Hotkey: (Left alt) + (Lowercase a) for left click and (Left alt) + (Lowercase s) for right click
  • Intuitive Process: KeyFlare simply opens up a fullscreen image to show you the options on the screen.
  • Enhanced image segmentation algorithm that optimizes speed.
  • Cross-platform compatibility with Linux, macOS, and Windows. (Untested on macOS since I do not have access to that environment at the moment.)

In the works

  • Specifying the number of clicks desired through preferences.
  • Making it easier to use KeyFlare through imports by improving the documentation.

Please fill out the survey

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keyflare-1.2.0.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

keyflare-1.2.0-py3-none-any.whl (15.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page