Skip to main content

# 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.

Release files for macrokeyd 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for macrokeyd 0.1.11
File Size Uploaded
macrokeyd-0.1.11.tar.gz 2.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for macrokeyd 0.1.11
File Interpreter ABI Platform
macrokeyd-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 4.2 MB

Release files / macrokeyd-0.1.11.tar.gz

Download URL macrokeyd-0.1.11.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
cc6134581a6a5714202c11901f4159abab3819bdf7f506fdad266f6d02e8f565
BLAKE2b-256 checksum
How to use checksums
f3c12b7d9c6e0665c6d1c3011be089ef366671c9bcd3d8c0518316467d1bb928
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / macrokeyd-0.1.11-py3-none-any.whl

Download URL macrokeyd-0.1.11-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a47ac603c8b6d61a7811bdd92c0bbb6b018e01ad7b3dedd60b4cb4899bd3c025
BLAKE2b-256 checksum
How to use checksums
43558aff5380dfbd04456b40b1999184d8444b53fa46cfee338577b5aad37e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page