import{_ as e,c as t,o as a,N as o}from"./chunks/framework.0799945b.js";const u=JSON.parse('{"title":"Module: features/hotkey","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/modules/features/hotkey.md","lastUpdated":null}'),r={name:"api/modules/features/hotkey.md"},d=o('
• BaseHotkey: Object
The properties that are added onto a processed HotkeyOptions to create an Hotkey.
Name | Type | Description |
---|---|---|
type | typeof HotkeyType | A symbol that helps identify features of the same type. |
profectus/src/features/hotkey.tsx:40
• HotkeyOptions: Object
An object that configures a Hotkey.
Name | Type | Description |
---|---|---|
description | Computable <string > | The description of this hotkey, to display in the settings. |
enabled? | Computable <boolean > | Whether or not this hotkey is currently enabled. |
key | string | The key tied to this hotkey |
onPress | VoidFunction | What to do upon pressing the key. |
profectus/src/features/hotkey.tsx:26
Ƭ GenericHotkey: Replace
<Hotkey
<HotkeyOptions
>, { enabled
: ProcessedComputable
<boolean
> }>
A type that matches any valid Hotkey object.
profectus/src/features/hotkey.tsx:55
Ƭ Hotkey<T
>: Replace
<T
& BaseHotkey
, { description
: GetComputableType
<T
["description"
]> ; enabled
: GetComputableTypeWithDefault
<T
["enabled"
], true
> }>
An object that represents a hotkey shortcut that performs an action upon a key sequence being pressed.
Name | Type |
---|---|
T | extends HotkeyOptions |
profectus/src/features/hotkey.tsx:46
• Const
HotkeyType: typeof HotkeyType
A symbol used to identify Hotkey features.
profectus/src/features/hotkey.tsx:21
• Const
hotkeys: Record
<string
, GenericHotkey
| undefined
>
A dictionary of all hotkeys.
profectus/src/features/hotkey.tsx:19
▸ createHotkey<T
>(optionsFunc
): Hotkey
<T
>
Lazily creates a hotkey with the given options.
Name | Type |
---|---|
T | extends HotkeyOptions |
Name | Type | Description |
---|---|---|
optionsFunc | OptionsFunc <T , BaseHotkey , GenericHotkey > | Hotkey options. |
Hotkey
<T
>