HotkeyManager
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:10
Properties
app
app:
App
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:14
Reference to App
bakedHotkeys
bakedHotkeys:
KeymapInfo
[]
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:20
Assigned hotkeys
bakedIds
bakedIds:
string
[]
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:24
Array of hotkey index to command ID
customKeys
customKeys:
HotkeyManagerCustomKeysRecord
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:28
Custom (non-Obsidian default) hotkeys, one to many mapping of command ID to assigned hotkey
defaultKeys
defaultKeys:
HotkeyManagerDefaultKeysRecord
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:32
Default hotkeys, one to many mapping of command ID to assigned hotkey
Methods
addDefaultHotkeys()
addDefaultHotkeys(
command
,keys
):void
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:42
Add a hotkey to the default hotkeys
Parameters
command
string
Command ID to add hotkey to
keys
Hotkeys to add
Returns
void
getDefaultHotkeys()
getDefaultHotkeys(
command
):KeymapInfo
[]
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:50
Get hotkey associated with command ID
Parameters
command
string
Command ID to get hotkey for
Returns
getHotkeys()
getHotkeys(
command
):KeymapInfo
[]
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:56
Get hotkey associated with command ID
Parameters
command
string
Command ID to get hotkey for
Returns
onTrigger()
onTrigger(
event
,keypress
):boolean
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:67
Trigger a command by keyboard event
Parameters
event
Keyboard event to trigger command with
keypress
Pressed key information
Returns
boolean
printHotkeyForCommand()
printHotkeyForCommand(
commandId
):string
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:73
Pretty-print hotkey of a command
Parameters
commandId
string
Command ID to print hotkey for
Returns
string
removeDefaultHotkeys()
removeDefaultHotkeys(
command
):void
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:81
Remove a hotkey from the default hotkeys
Parameters
command
string
Command ID to remove hotkey from
Returns
void
removeHotkeys()
removeHotkeys(
command
):void
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:87
Remove a hotkey from the custom hotkeys
Parameters
command
string
Command ID to remove hotkey from
Returns
void
setHotkeys()
setHotkeys(
command
,keys
):void
Defined in: src/obsidian/internals/HotkeyManager/HotkeyManager.d.ts:96
Add a hotkey to the custom hotkeys (overrides default hotkeys)
Parameters
command
string
Command ID to add hotkey to
keys
Hotkeys to add
Returns
void