Skip to main content

A cross-platform hot key module.

Project description



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


pip install PyHotKey


from os.path import join
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

# Show the hot key list

# Turn on the logger
manager.logger = True

# custom the log path
manager.setLogPath(join('log', 'HotKeyLog.txt'))

# Turn off the logger
manager.logger = False

Release Note


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


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


  • Remove log message.


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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for PyHotKey, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size PyHotKey-1.3.0-py2.py3-none-any.whl (7.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size PyHotKey-1.3.0.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page