It derives from <GtkWidget>.
A widget that displays a keyboard shortcut.
The shown shortcut can be set using the ShortcutLabel:accelerator
property.
Optionally, if no shortcut is set,
<AdwShortcutLabel> will display a
placeholder set with the ShortcutLabel:disabled-text property.
The following types of shortcuts can be displayed:
accelerator-parse format, e.g.
<Control>C:
<Shift>A Home:
..., e.g. <Alt>1...9:
&, e.g.
Control_L&Control_R:
+, e.g. <Control>C+<Control>X:
::: note <, > and & need to be escaped as
<, > and & when used in UI files.
<AdwShortcutLabel> has a single CSS node
with name shortcut-label. The individual keycap labels each have
the .keycap style class, while the labels separating them have
the .dimmed style class.
<AdwShortcutLabel> uses the
Gtk.AccessibleRole.label role.
See also: ShortcutsDialog.
The displayed accelerator.
Its value is a string, or #f.
Set it with (set! (shortcut-label:accelerator self) value).
The text displayed when no accelerator is set.
Its value is a string, or #f.
Set it with (set! (shortcut-label:disabled-text self) value).
Gets the accelerator displayed by self.
Passed: a <AdwShortcutLabel>.
a shortcut label
Returned: a string.
the displayed accelerator
Gets the text displayed by self when no accelerator is set.
Passed: a <AdwShortcutLabel>.
a shortcut label
Returned: a string.
the text displayed when no accelerator is set
Creates a new <AdwShortcutLabel> showing
accelerator.
Passed: a string.
the accelerator to show
Returned: a <GtkWidget>.
the newly created <AdwShortcutLabel>
Sets the accelerator to be displayed by self.
Passed: a <AdwShortcutLabel>.
a shortcut label
Passed: a string.
the accelerator to be displayed
Sets the text to be displayed by self when no accelerator is set.
Passed: a <AdwShortcutLabel>.
a shortcut label
Passed: a string.
the text displayed when no accelerator is set