Skip to main content

KeyboardShortcut

    Use the KeyboardShortcut to display one or more keys that represent a keyboard shortcut for a specific action.

    When to use​

    • To display keyboard shortcuts next to the actions they trigger, such as in menu items or tooltips.

    When not to use​

    • When you need to show a keyboard shortcut inside a tooltip. Use KeyboardShortcutTooltip instead.
    • On mobile and touch views, where shortcuts don't apply.

    Variants​

    KeyboardShortcut components come in two emphasis levels: default and minimal.

    Two KeyboardShortcut variants: Default, which boxes each key for emphasis, and Minimal, which shows the keys as plain text so they stand out less. Two KeyboardShortcut variants: Default, which boxes each key for emphasis, and Minimal, which shows the keys as plain text so they stand out less.

    Default​

    • Use the default variant to ensure the keyboard shortcut you're describing stands out and is quickly identifiable next to other content.

    Minimal​

    • Use the minimal variant if the keyboard shortcut is extra information that shouldn't stand out, such as a KeyboardShortcut as a suffix of a Menu item.
    Still have questions?
    Find answers in the Dynatrace Community