/pyhotkeys

Simple broadly-compatible hotkey program for macos/ubuntu for my own use.

Primary LanguagePythonMIT LicenseMIT

PyHotkey

A hotkey combination listener that outputs text after keypress combo listener is activated.

Installation

This was created under the assumption of python version 3.11

To install PyHotkey, run the following command:

pip install pyhotkey

Usage

To activate the PyHotkey hotkey combination listener, use:

pyhotkey

Virtual Env

Run . ./use-venv.sh to switch to python3.11 using python and activate/create the virtual environment.

Features

  • Activate and deactivate the hotkey combination listener using a PyHotkey modifier key.
  • Define your custom hotkey combinations and their corresponding actions in combos.json.

Configuration

Edit combos.json to define your hotkey combinations and the text that should be output when each combination is activated.

Example:

{
  "ctrl+alt+a": "Text for ctrl+alt+a",
  "ctrl+alt+b": "Text for ctrl+alt+b"
}

Tests

To run tests, run the following command:

python -m unittest tests.py

Contribution

Contributions are welcome! Please read the contribution guidelines first.

License

MIT

Author

Cary Carter Email: ccarterdev@gmail.com GitHub: cc-d