Skip to main content

A cross-platform hot key module.

Project description

PyHotKey

Description

PyHotKey is a cross-platform hot key module for Python. Based on "Pynput" module.

Installation

pip install PyHotKey

Usage:

from PyHotKey import manager, Key

# Register
key_id1 = manager.RegisterHotKey(func1, [Key.ctrl_l, Key.alt_l, 'z'])
key_id2 = manager.RegisterHotKey(func2, [Key.caps_lock], 2, 0.5,
                                 func2_arg1, func2_arg2=1)
# Unregister
manager.UnregisterHotKey(key_id1)

# Turn on the logger
manager.logger = True

# Turn off the logger
manager.logger = False
...

Release Note

v1.2.0

  • Add logger.
  • Optimize code.
  • Attempt to fix a potential bug.

v1.1.1

  • Remove log message.

v1.1.0

  • Currently, the trigger function supports arguments.
  • No longer need to call manager.start() manually.
  • Fix multiple type hot key bug.

v1.0 - Initial Release

  • The first version.

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

PyHotKey-1.2.0.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

PyHotKey-1.2.0-py2.py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 2 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