KeyboardShortcut

abstract class KeyboardShortcut : BaseKeyboardShortcut

An abstract keyboard shortcut used to perform some action in Anvil.

NOTE Keyboard shortcuts must adhere to the following implementation rules:

  1. All non-abstract subclass implementations must be a child type of a sealed class that corresponds to a KeyboardShortcutCategory.

  2. All non-abstract subclass implementations must be an object.

  3. All abstract subclass implementations must be a sealed class that corresponds to a single KeyboardShortcutCategory.

Author

Richard Arriaga

Constructors

Link copied to clipboard
fun KeyboardShortcut()

Functions

Link copied to clipboard
open fun addToInputMap(inputMap: InputMap)

Add this KeyboardShortcut to the provided InputMap.

Link copied to clipboard
open fun matchesOther(bks: BaseKeyboardShortcut): Boolean

Check to see if the provided BaseKeyboardShortcut matches the key bindings of this BaseKeyboardShortcut while having different actionMapKeys.

Link copied to clipboard
fun resetToDefaults()

Reset the key to the defaultKey.

Link copied to clipboard
fun updateFrom(keyStroke: KeyStroke): Boolean

Update this KeyboardShortcut to match the ModifierKeys and KeyCode used in the provided KeyStroke.

Properties

Link copied to clipboard
abstract val actionMapKey: String

The key that identifies this BaseKeyboardShortcut.

Link copied to clipboard
abstract val category: KeyboardShortcutCategory

The KeyboardShortcutCategory this shortcut belongs to.

Link copied to clipboard
open val customizable: Boolean = true

This KeyboardShortcut is permitted to customized for an environment.

Link copied to clipboard
abstract val defaultKey: Key

The default Key when pressed triggers this shortcut.

Link copied to clipboard
abstract val description: String

The description of the action the shortcut performs.

Link copied to clipboard
val descriptionDisplay: String

The description that is displayed that describes the shortcut or the actionMapKey if the description is empty.

Link copied to clipboard
abstract var key: Key

The key of this BaseKeyboardShortcut.

Link copied to clipboard
open val keyStroke: KeyStroke

The KeyStroke used to trigger this KeyboardShortcut.

Link copied to clipboard
val shortcutOverride: KeyboardShortcutOverride

A corresponding KeyboardShortcutOverride sourced from this KeyboardShortcut.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard