Skip to main content

A Hotkey Manager using PySimpleGUI and psgtray

Project description

psghotkey

A PySimpleGUI Application

Windows Hotkey Tool

Features

  • A complete hotkey manager
  • Demonstrates integrating the system tray into your application
  • Example sophisticated docstring formatting application of a hotkey

Installation

Using PIP with PyPI

The latest official release of PySimpleGUI products can be found on PyPI. To pip install the demo applications from PyPI, use this command

If you use the command python on your computer to invoke Python (Windows):

python -m pip install --upgrade psghotkey

If you use the command python3 on your computer to invoke Python (Linux, Mac):

python3 -m pip install --upgrade psghotkey

Using PIP with GitHub

You can also pip install the PySimpleGUI Applications that are in the PySimpleGUI GitHub account. The GitHub versions have bug fixes and new programs/features that have not yet been released to PyPI. To directly pip install from that repo:

If you use the command python on your computer to invoke Python (Windows):

python -m pip install --upgrade https://github.com/PySimpleGUI/psghotkey/zipball/main

If you use the command python3 on your computer to invoke Python (Linux, Mac):

python3 -m pip install --upgrade https://github.com/PySimpleGUI/psghotkey/zipball/main

Usage

Once installed, launch psghotkey by typing the following in your command line:

psghotkey

Packages Used

This project uses these pip installable packages:

  • PySimpleGUI
  • psgtray
  • keyboard

Mash-up

This project is a mash-up of some PySimpleGUI demo programs and a program called pingmote. The pingmote project is the origin of the keyboard handler. A big thank you to @dchen327 for the code and inspiration.

The system tray code is from the psgtray. The psgtray package is an important add-on to the tkinter port of PySimpleGUI as it enables you to run your applications in the system tray.

Windows Only (most likely)

psgtray runs the best on Windows and is used in this project. It's not been tried on Linux (recently) nor the Mac.

Opportunities for Improvement

Not a lot of time was spent on the entire project. It was some personal utilities that I wrote for myself and then reaslized that maybe others would want to extend their IDEs as well or do other hotkey kind of operations.

In this project, they keyboard handler hooks in at a low level such that all keystrokes will be passed to the program. The keyboard package likely has a more efficient and higher level interface that's not being used.

"Satisfice" is a word I recently discovered and realized it matches the prototype code that I write. It's pretty hacky kind of code as it's meant to do a specific job, on my system, and not designed in a high general purpose way. It's the "first pass" code... raw, simple, working stuff but not much more than that. It should at least work on your system though, assuming you're able to run psgtray and PySimpleGUI.

I hope you are able to find something here that helps you create your own tools that makes you more efficient.

License & Copyright

Copyright 2023-2026 PySimpleGUI.

Licensed under LGPL3.

Contributing

We are happy to receive issues describing bug reports and feature requests! If your bug report relates to a security vulnerability, please do not file a public issue, and please instead reach out to us at issues@PySimpleGUI.com.

We do not accept (and do not wish to receive) contributions of user-created or third-party code, including patches, pull requests, or code snippets incorporated into submitted issues. Please do not send us any such code! Bug reports and feature requests should not include any source code.

If you nonetheless submit any user-created or third-party code to us, (1) you assign to us all rights and title in or relating to the code; and (2) to the extent any such assignment is not fully effective, you hereby grant to us a royalty-free, perpetual, irrevocable, worldwide, unlimited, sublicensable, transferrable license under all intellectual property rights embodied therein or relating thereto, to exploit the code in any manner we choose, including to incorporate the code into PySimpleGUI and to redistribute it under any terms at our discretion.

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

psghotkey-6.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

psghotkey-6.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file psghotkey-6.0.tar.gz.

File metadata

  • Download URL: psghotkey-6.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for psghotkey-6.0.tar.gz
Algorithm Hash digest
SHA256 c9b1e3183ffe89d880bedb959f27d3b3a8399943590a14790ad9d6da182f0cd1
MD5 739c0634555aae04eeeb9c53e3d91d35
BLAKE2b-256 08a3fedd356eff94db867b7628a438a75db2e38deb5a2fc5fa4929b541b0c9aa

See more details on using hashes here.

File details

Details for the file psghotkey-6.0-py3-none-any.whl.

File metadata

  • Download URL: psghotkey-6.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for psghotkey-6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7959965fe08e095dcaa229c9404c023d202824afbf1d98bbb216c9ce919398fb
MD5 2f22bd394a032d2d71c3f33baee0b018
BLAKE2b-256 27400c89fcda3b1bc50090fb8af245dbcff12e3256c8febfdf5d5e05118bf95a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page