Display context-sensitive keyboard shortcuts or other hints on Linux and Windows
Project description
keyhint
Display keyboard shortcuts or other hints based on the process name and window title of the active window. (Linux/Windows)
Usage
- Install:
pip install keyhint
- Execute:
keyhint
- Tip: Configure a global hotkey to start
keyhint
on demand!
Keyhint showing shortcuts for VS Code:
Configuration
Look & Behavior
- You can configure colors, font and closing behavior by modifying the file
<CONFIG_PATH>/keyhint/config.yaml
Hints
-
You can also configure the hints to show for different applications by modifying or adding section in the file
<CONFIG_PATH>/keyhint/hints.yaml
-
The hints to display are selected by going through all sections from top to bottom and comparing the value of
regex_process
with the process name of the active window and the value ofregex_title
with the title of the active window. The first section, where both values are found, gets displayed. -
Both of those
regex_
values are interpreted as case insensitive regular expressions.)
Notes
-
The
<CONFIG_PATH>
can be different from system to system. On Linux it's usually~/.config
, on Windows it should beC:\Users\<YOURNAME>\AppData\Roaming
. -
You can reset configuration or hints to the shipped version by deleting the
yaml
files from the configuration folder.
Tips
Differentiate Websites:
- For showing different browser-hints depending on the current website, you might want to use a browser extension like "Add URL To Window Title" and then configure the sections in
hints.yaml
to look for the URL in the window title.
Differentiate Multi Platform:
-
Sometimes the hints you want to show are the same for e.g. Linux and Windows. In that case, you might want to set e.g.
regex_process: firefox.*
to match withFirefox
(Linux) as well as withFirefox.exe
(Windows). -
If you want to show different hints for the same tool depending on the platform, use two sections, one with
regex_process: firefox(?!\.exe)
(Linux) and one withregex_process: firefox\.exe
(Windows).
Contribute
I'm happy about any contribution! Especially I would appreciate submissions to improve the shipped hints. (The current set are the hints I personally use).
Design Principles
- Multi-Platform
Should work on Linux, Mac (not yet achieved) & Windows. - Don't run as service
It shouldn't consume resources in the background, even if this leads to slower start-up time. - No network connection
Everything should run locally without any network communication. - Dependencies
The fewer dependencies, the better. - Chain of Responsibility as main design pattern
See description on refactoring.guru - Multi-Monitors
Supports setups with two or more displays
Certification
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file keyhint-0.1.3.tar.gz
.
File metadata
- Download URL: keyhint-0.1.3.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e0195c35316971973dc2d89a5b4dc0db94aa66f7a2627a7453271715837b1fe |
|
MD5 | 8ed18b21a08226ab07e41c6fde48305e |
|
BLAKE2b-256 | a5393860e51467e5fc7cfe98e60d82b7e69c76aa6c8214f313e5a18b4d9552d6 |
File details
Details for the file keyhint-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: keyhint-0.1.3-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53a015765e033914e769ccb8cabb05b743d7fc348457f8ad21c36421a68ffe01 |
|
MD5 | 9347b1f39619e84842ee77dce34c4e2b |
|
BLAKE2b-256 | 865c04b61e8f851e04aa94969b21859e355a58599a96ea96c3b71c8e07247169 |