Skip to main content

pygs

Latest PyPI version Number of PyPI downloads Travis-CI build status

http://dl.dropbox.com/u/750959/pygs_strike.png

Overview

pygs provides cross-platform global hotkey / shortcuts for python using PyQt.

pygs is a wrapper for libqxt’s QxtGlobalShortcut.

My aim is to provide cross-platform support for global hotkeys (shortcuts) in python. Ideally I would like to remove the PyQt and libqxt dependency but that remains a (distant) future goal. I believe it is definitely possible and potentially quite useful though.

This fork support PyQt4 / PyQt5 on Python 2.x / 3.x.

Installation

Requirements

Minimal for working:

For building from source:

None of them could be installed automatic, please download and install them manually.

If you install them from a package manager, please also install development packages (if exist).

Install from Source Code

$ pip install PyGlobalShortcut

or

$ setup.py install

(Target Qt version can be specified by environment variable QT_SELECT, valid values are 4 or 5.)

Install from Binary Package

WARNING: Binary package probably only work with corresponding PyQt binary package.

Binary package can be found at release page, please download an unzip it.

The file name of binary packages contains name of corresponding PyQt binary package (behind ‘-for-‘), if that package does not exist or your PyQt is not installed from official binary package, please install pygs from source code.

There is a Wheel in it, install it by:

$ pip install <filepath.whl>

Again, binary package probably only work with corresponding PyQt binary package, please use it carefully.

Usage

See examples/simple.py

$ python simple.py
Ctrl+Alt+S - activate shortcut
Ctrl+Alt+F - quit application

NOTE: Ctrl maps to COMMAND on macs!!!! Yeah this is crazy confusing. But it’s Qt not me :)

Testing

There is a minimal test suite that check the compilation process for various environments and ensure QxtGlobalShortcut can be properly imported and used.

To run the tests, you must first install tox:

$ pip install tox

Then you can run the tests by running the following command:

$ tox

To run the tests against a specific environment, use the -e option. E.g. to run tests with Python 2.7 and PyQt4, you would run:

$ tox -e py27-pyqt4

Here is the list of available test environments:

  • py27-pyqt4

  • py27-pyqt5

  • py32-pyqt4

  • py32-pyqt5

  • py33-pyqt4

  • py33-pyqt5

  • py34-pyqt4

  • py34-pyqt5

Acknowledgements

pygs uses

Thanks!

License

pygs - Python bindings to libqxt’s QxtGlobalShortcut using SIP and PyQt. In other words, global hotkeys for PyQt.

Copyright (C) 2010 J. Matt Peterson
Copyright (C) 2014 Asvel

You may use pygs under the terms of the General Public License (GPL) Version 3 or you may contact the author for permission or a commercial license. The commercial license option is specifically provided for those who are unable or unwilling to use the GPL.

http://www.gnu.org/licenses/gpl-3.0.txt

Metadata

Release files for PyGlobalShortcut 0.2.3

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

Source distribution (sdist)

Source distribution for PyGlobalShortcut 0.2.3
File Size Uploaded Provenance Actions
PyGlobalShortcut-0.2.3.zip 44.6 kB Without provenance Details for PyGlobalShortcut-0.2.3.zip

Release files / PyGlobalShortcut-0.2.3.zip

Download URL PyGlobalShortcut-0.2.3.zip
Size 44.6 kB
Tags Source
SHA-256 checksum
How to use checksums
86fd24f4394d766c605dbdfcfbacd0710dd9b416168c5fdda91b53d268f92b48
BLAKE2b-256 checksum
How to use checksums
d4de6c91a656bcc653daa0af06017309d796a394fb980298a340ae136ff373e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyGlobalShortcut 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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