Expand description
Platform- and locale-aware formatting for [KeyStroke]s.
- On macOS, the returned string uses the traditional symbol modifiers (⌘⇧⌥⌃) and Unicode key glyphs (↑↩⇥ …). These symbols are universal — no locale lookup needed.
- On Windows / Linux, the modifier labels and named-key labels
(Enter, Esc, Space, arrows, Home/End, PageUp/Down, …) flow
through
tr_widget!(teksilo-i18n’s compile-time-checked translation macro) so apps that register teksilo-widgets’ framework locales see “Strg+Eingabe” in German, “Ctrl+Entrée” in French, “Ctrl+Enter” in English, etc. Letters, digits, character keys and F1..F12 fall through toKey::Display— those names are universal.
Apps that want full control can bypass this function entirely —
the settings widget simply calls format_keystroke at render
time, so overriding the visible label means substituting a
different formatter at the caller.
Functions§
- format_
keystroke - Render
keystrokeas the conventional label for the current platform and active locale.