KontextMenuKeyShortcut

class KontextMenuKeyShortcut(val key: Key, val ctrl: Boolean = false, val meta: Boolean = false, val alt: Boolean = false, val shift: Boolean = false)

Represents a keyboard shortcut for context menu items.

This class handles the representation of keyboard shortcuts with support for platform-specific formatting (using symbols on macOS, text on other platforms).

Constructors

Link copied to clipboard
constructor(key: Key, ctrl: Boolean = false, meta: Boolean = false, alt: Boolean = false, shift: Boolean = false)

Types

Link copied to clipboard
object Companion

Companion object containing platform-specific modifier key representations.

Properties

Link copied to clipboard
val alt: Boolean = false

Whether the Alt/Option key is part of the shortcut

Link copied to clipboard
val ctrl: Boolean = false

Whether the Control key is part of the shortcut

Link copied to clipboard
val key: Key

The main key of the shortcut

Link copied to clipboard
val meta: Boolean = false

Whether the Meta/Command key is part of the shortcut

Link copied to clipboard
val shift: Boolean = false

Whether the Shift key is part of the shortcut

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Gets a formatted string representation of the keyboard shortcut.

Link copied to clipboard

Gets the text representation of the key.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String