setting-components/hotkey-component
Contains a component that records a hotkey.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| HotkeyComponent | A component that records a hotkey: click the button, then press the key combination. Escape cancels the recording, and the clear button sets the value to null. The value is a Hotkey, the shape Obsidian stores in hotkeys.json, so it can be handed to Scope.register. You can add this component using SettingEx.addHotkey. In order to add the styles for the component, use initPluginContext in your plugin’s onload() function. Alternatively, you can copy styles from https://unpkg.com/@mnaoumov/obsidian-lib/dist/styles.css. |