Skip to main content

Macro daemon for dedicated keyboards

Project description

# macrokeyd

macrokeyd is a Python daemon that allows assigning custom actions to a specific keyboard, such as commands, text, system shortcuts, or chained sequences. It is designed to run as a systemd service and configured through modular JSON files.


🚀 Quick Installation from PyPI

pip install macrokeyd

Requires Python >= 3.7 and Linux with evdev support.


🧪 Testing Installation

macrokeyd --help
macrokeyd --version

You can start the daemon with:

macrokeyd --run

By default, it searches for ~/.local/share/macrokeyd/default.json and creates it if it doesn't exist.


⚙️ Installing as a systemd service

macrokeyd-install-service

Check the status:

systemctl status macrokeyd

Uninstall:

macrokeyd-uninstall-service

📌 Installation with System Python (Recommended for Gtk Integration)

If you're using Gtk integration (such as PyGObject), it's recommended to use the system Python to avoid compatibility issues:

sudo apt install python3 python3-pip python3-venv python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-appindicator3-0.1

Also, install Tkinter for MouseInfo support, which requires system-level libraries:

sudo apt install python3-tk python3-dev
pyenv virtualenv --system-site-packages system macrokeyd-env
pyenv local macrokeyd-env
pip install macrokeyd

Verify the installation:

python -c "import gi; print(gi.__file__)"

The output should resemble:

/usr/lib/python3/dist-packages/gi/__init__.py

🎛️ Macro Configuration

The configuration file is located at (or created at):

~/.local/share/macrokeyd/default.json

Example content:

{
  "meta": {
    "target_device_name": "TEC-FX556K"
  },
  "macros": {
    "KEY_Q": {"action": "command", "value": "gnome-terminal"},
    "KEY_W": {"action": "text", "value": "Hello world"}
  }
}

🧱 Local Development

git clone https://gitlab.com/your_user/macrokeyd.git
cd macrokeyd
make install

🛠 Useful Commands (make)

  • make build → generates .whl and .tar.gz packages
  • make install → installs locally with --force-reinstall
  • make clean → cleans up artifacts
  • make release LEVEL=patch → bumps version and pushes
  • make release-changelog → same as release and updates CHANGELOG.md
  • make release-pypi → publishes to PyPI
  • make release-test → publishes to TestPyPI

📦 Publishing to PyPI

Check RELEASE.md for the full versioning and release cycle details.

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

macrokeyd-0.1.10.tar.gz (2.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macrokeyd-0.1.10-py3-none-any.whl (2.1 MB view details)

Uploaded Python 3

File details

Details for the file macrokeyd-0.1.10.tar.gz.

File metadata

  • Download URL: macrokeyd-0.1.10.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for macrokeyd-0.1.10.tar.gz
Algorithm Hash digest
SHA256 d5980d764cb43721f5084bedb14aab94c371f0b6410743e54b42a7fab0bb20f3
MD5 748b57b6fdedac9c75dc3ff645b6e055
BLAKE2b-256 d14ef948f630ecd076c5f3ecd4e1aa494337245c48270bb70620d7c93b0a5e15

See more details on using hashes here.

File details

Details for the file macrokeyd-0.1.10-py3-none-any.whl.

File metadata

  • Download URL: macrokeyd-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for macrokeyd-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 5bdf2557548dc5cfc6a0f25d41aa255e5aae1cbb7b60ab7e05a7fb17b566e6ef
MD5 dd4c4c15c4e05f8e24ef97f17babe7ad
BLAKE2b-256 46669b21a448c52d81b63e5f34f4f171591d416c14f6d6e33d3aa833f5b560f1

See more details on using hashes here.

Supported by

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