Hotkey

interface Hotkey

Represents a hotkey.

See also

Types

Link copied to clipboard
enum Action
Link copied to clipboard
class Key
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
enum Type

Functions

Link copied to clipboard
abstract fun addKeysChangeListener(@NotNull onKeysChange: @NotNull Hotkey.OnKeysChange)
Adds a listener to be notified when the getKeys change.
Link copied to clipboard
abstract fun addPressListener(@NotNull onPress: @NotNull Hotkey.OnPress)
Adds a listener to be notified when the hotkey is pressed.
Link copied to clipboard
Clears all keys change listeners.
Link copied to clipboard
abstract fun clearPressListener()
Clears all press listeners.
Link copied to clipboard
abstract fun getKeys(): Set<Hotkey.Key>
Gets the set of keys associated with this hotkey.
Link copied to clipboard
@NotNull
abstract fun getName(): @NotNull String
Gets the name of the hotkey.
Link copied to clipboard
abstract fun isAnyContext(): Boolean
Checks if the hotkey is active in any context.
Link copied to clipboard
abstract fun isPressed(): Boolean
Checks if the hotkey is currently pressed.
Link copied to clipboard
abstract fun removeKeysChangeListener(@NotNull onKeysChange: @NotNull Hotkey.OnKeysChange)
Removes a keys change listener.
Link copied to clipboard
abstract fun removePressListener(@NotNull onPress: @NotNull Hotkey.OnPress)
Removes a press listener.
Link copied to clipboard
abstract fun resetState()
Resets the pressed state of the hotkey.
Link copied to clipboard
abstract fun setKeys(@NotNull newKeys: @NotNull Set<Hotkey.Key>)
Sets the keys associated with this hotkey.
Link copied to clipboard
abstract fun updateState(@NotNull action: @NotNull Hotkey.Action)
Updates the pressed state of the hotkey based on a given action.