ModifierShortcut

interface ModifierShortcut

This interface models the modifier shortcuts, that enable combination of shortcuts like "STRG + F" or alike.

If offers default implementation for concatenating modifiers with "real" shortcuts or just Strings to offer a beautiful readable shortcut combination:

// Start with modifier shortcut and append just a String
Keys.Control + "K"
// or other way round
Shortcut("K") + Keys.Control

See also

Functions

plus
Link copied to clipboard
js
open operator fun plus(other: Shortcut): Shortcut
This operator function enables the concatenation with a Shortcut:
Keys.Alt + Shortcut("K")
open operator fun plus(other: String): Shortcut
This operator function enables the concatenation with simply a String to enable a nice readable keyboard combination:
Keys.Shift + "F"
Be aware that the Shortcut.key property is case sensitive just likte the KeyboardEvent.key property.

Properties

alt
Link copied to clipboard
js
abstract val alt: Boolean
ctrl
Link copied to clipboard
js
abstract val ctrl: Boolean
meta
Link copied to clipboard
js
abstract val meta: Boolean
shift
Link copied to clipboard
js
abstract val shift: Boolean

Inheritors

Shortcut
Link copied to clipboard

Extensions

plus
Link copied to clipboard
js
operator fun ModifierShortcut.plus(other: ModifierShortcut): ModifierShortcut
Enables combination of ModifierShortcuts like "STRG + ALT + F":
Keys.Control + Keys.Alt + "F"