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" library.

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)

# Show the hot key list
print(manager.hotKeyList)

# Turn on the logger
manager.logger = True

# custom the log path
manager.setLogPath('MyLog.txt')

# Turn off the logger
manager.logger = False

Release Note

v1.3.1

  • Delete a deprecated class.
  • Replace root logger with a separate logger.
  • Rename property "hot_keys" to "hotKeyList".
  • Change documents and some code comments.

v1.3.0

  • Currently, users can customize the log path.
  • Optimize code.

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.3.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

PyHotKey-1.3.1-py2.py3-none-any.whl (9.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file PyHotKey-1.3.1.tar.gz.

File metadata

  • Download URL: PyHotKey-1.3.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.2

File hashes

Hashes for PyHotKey-1.3.1.tar.gz
Algorithm Hash digest
SHA256 c186af2e5be431dc21b76d9ab27bf790ed84c8a0723df480093c80d13e048ed8
MD5 0634f40bd3acd63df6d38c1671a7f784
BLAKE2b-256 58f1a5add43873fcfc83a5dd3b9dd2199fbc9d0a79dc0b6266f0d27aa9cffde4

See more details on using hashes here.

Provenance

File details

Details for the file PyHotKey-1.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: PyHotKey-1.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.2

File hashes

Hashes for PyHotKey-1.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0e1732d43c2e820fb795b3c8027cbe6462be994f3cac39dbd2fe194f1541232a
MD5 1a0387bd158b7c3e95d2416f64c440c4
BLAKE2b-256 ed2aeabbb078cce3f998a74f3e42eda306f935b2cda3730d2a8ed944f12e6693

See more details on using hashes here.

Provenance

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