Keybinding hint
A muted hint that pairs an action with its shortcut, for footers and empty states.
ui.keybinding_hint · Category: Feedback · Full reference →


pz.column([ ui.keybinding_hint("Open file", "ctrl-p"), ui.keybinding_hint("Command palette", "ctrl-shift-p"), ui.keybinding_hint("Toggle terminal", "ctrl-j"),], spacing=10, align="center")When to use
Section titled “When to use”- In empty editors and footers, to teach the shortcuts of the most useful actions.
import pyzed as pzfrom pyzed import ui
pz.column([ ui.keybinding_hint("Open file", "ctrl-p"), ui.keybinding_hint("Command palette", "ctrl-shift-p"), ui.keybinding_hint("Toggle terminal", "ctrl-j"),], spacing=10, align="center")Variants
Section titled “Variants”Examples
Section titled “Examples”

Code
ui.keybinding_hint("Search", "/")

Code
ui.keybinding_hint("Command palette", "ctrl-shift-p")

Code
ui.keybinding_hint("Keyboard shortcuts", "ctrl-k ctrl-s")Events
Section titled “Events”Keybinding hint has no events of its own: it shows what you give it. Like every widget it also has the 18 common events (click, double_click, right_click, mouse_enter, drag, key_down, resize…), attached with .on(...): see Events and Events of every component.
Properties and API
Section titled “Properties and API”ui.keybinding_hint
Section titled “ui.keybinding_hint”keybinding_hint(text, keys, *, theme=None)A muted hint like “Open file Ctrl P” for footers and empty states.
| Property | Default | Description |
|---|---|---|
text |
required | Text. |
keys |
required | Shortcut shown at the end, written as a string: "ctrl-s", "cmd-k cmd-s". |
theme |
None |
Theme to use instead of the current one (pyzed.theme.current()). |
Related
Section titled “Related”KbdKeyboard shortcuts drawn as keys, with symbols on macOS.
Empty stateA centered placeholder for empty lists and searches.
ShortcutsA searchable list of key bindings, grouped.