Cheat-sheets for shortcuts & commands at your fingertips.
MIT License
Utility to display keyboard shortcuts or other hints based on the active window on Linux.
sudo apt-get install \
libgirepository1.0-dev \
libcairo2-dev \
python3-gi \
gobject-introspection \
libgtk-4-dev
pipx install keyhint
(recommended, requires pipx)pip install keyhint
Ctrl + F1
) via your system settings tokeyhint
.Application Options:
-c, --cheatsheet=SHEET-ID Show cheatsheet with this ID on startup
-v, --verbose Verbose log output for debugging
The content which KeyHint displays is configured using toml
configuration files.
KeyHint reads those files from two locations:
~/.config/keyhint
regex_wmclass
with the wm_class of the active window and the value of regex_title
regex_
values are interpreted as case in-sensitive regular expressions.id
it will overwrite the defaults.id
to something unique.regex_wmclass
and regex_title
so it will be selected based on the activeshortcuts
& label
to a section
..toml
files from the config folder.include = ["<Cheatsheet ID>"]
To hide a cheatsheet, e.g. the
built-in one
with the ID tilix
, create a new file ~/.config/keyhint/tilix.toml
with the content:
id = "tilix"
hidden = true
To add keybindings to an existing cheatsheet, e.g. the
built-in one
with the ID firefox
, create a new file ~/.config/keyhint/firefox.toml
which only
contains the ID and the additional bindings:
id = "firefox"
[section]
[section."My Personal Favorites"] # New section
"Ctrl + Shift + Tab" = "Show all Tabs"
# ...
To add a new cheatsheet, which never gets automatically selected and displayed by
KeyHint, but remains accessible through KeyHint's cheatsheet dropdown, create a file
~/.config/keyhint/my-app.toml
:
id = "my-app"
url = "url-to-my-apps-keybindings"
[match]
regex_wmclass = "a^" # Patter which never matches
regex_title = "a^"
[section]
[section.General]
"Ctrl + C" = "Copy"
# ...
For showing different browser-cheatsheets depending on the current website, you might
want to use a browser extension like
"Add URL To Window Title"
and configure the [match]
section to look for the url in the title. E.g.
~/.config/keyhint/github.toml
id = "github.com"
[match]
regex_wmclass = "Firefox"
regex_title = ".*github\\.com.*" # URL added by browser extensions to window title
[section]
[section.Repositories]
gc = "Goto code tab"
# ...
I'm happy about any contribution! Especially I would appreciate submissions to improve the shipped cheatsheets. (The current set are the cheatsheets I personally use).