Hotkey API
IFolderRewindHotkeyProvider allows plugins to register hotkeys and execute logic when triggered.
Interface
GetHotkeyDefinitions(): return hotkey definition listOnHotkeyInvokedAsync(...): callback when hotkey is triggered
Key fields
PluginHotkeyDefinition important fields:
Id: unique ID within pluginDisplayName: user-visible nameDefaultGesture: for exampleAlt+Ctrl+SIsGlobalHotkey: whether it is global
Practical advice
- Avoid conflicts with common OS/system shortcuts
- Keep callback non-blocking; use async tasks for long operations
- Provide logs and status feedback for failure paths
MineRewind examples:
Alt+Ctrl+S: backup current active worldAlt+Ctrl+Z: hot restore current active world