Package org.gnome.adw

Class ShortcutLabel

java.lang.Object
All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("io.github.jwharm.JavaGI") public final class ShortcutLabel extends Widget implements Accessible, Buildable, ConstraintTarget
A widget that displays a keyboard shortcut.

shortcut-label

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:

shortcut-label-single

  • Multiple alternative shortcuts, separated with spaces, e.g. <Shift>A Home:

shortcut-label-alternative

  • A range of shortcuts, separated with ..., e.g. <Alt>1...9:

shortcut-label-range

  • Multiple keys pressed at once, separated with &, e.g. Control_L&Control_R:

shortcut-label-multiple

  • Multiple shortcuts or keys, pressed sequentially, separated with +, e.g. <Control>C+<Control>X:

shortcut-label-sequence

Note <, > and & need to be escaped as &lt;, &gt; and &amp; when used in UI files. ## CSS nodes 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. ## Accessibility AdwShortcutLabel uses the GTK_ACCESSIBLE_ROLE_LABEL role. See also: [class@ShortcutsDialog].

Since:
1.8