profectus-docs/assets/api_modules_features_hotkey.md.9bdca378.js

2 lines
9.9 KiB
JavaScript
Raw Normal View History

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('<h1 id="module-features-hotkey" tabindex="-1">Module: features/hotkey <a class="header-anchor" href="#module-features-hotkey" aria-label="Permalink to &quot;Module: features/hotkey&quot;"></a></h1><h2 id="interfaces" tabindex="-1">Interfaces <a class="header-anchor" href="#interfaces" aria-label="Permalink to &quot;Interfaces&quot;"></a></h2><h3 id="basehotkey" tabindex="-1">BaseHotkey <a class="header-anchor" href="#basehotkey" aria-label="Permalink to &quot;BaseHotkey&quot;"></a></h3><p> <strong>BaseHotkey</strong>: <code>Object</code></p><p>The properties that are added onto a processed <a href="./hotkey#hotkeyoptions">HotkeyOptions</a> to create an <a href="./hotkey#hotkey">Hotkey</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>type</code></td><td style="text-align:left;">typeof <a href="./hotkey#hotkeytype"><code>HotkeyType</code></a></td><td style="text-align:left;">A symbol that helps identify features of the same type.</td></tr></tbody></table><h4 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/8c0a0c4/src/features/hotkey.tsx#L40" target="_blank" rel="noreferrer">profectus/src/features/hotkey.tsx:40</a></p><hr><h3 id="hotkeyoptions" tabindex="-1">HotkeyOptions <a class="header-anchor" href="#hotkeyoptions" aria-label="Permalink to &quot;HotkeyOptions&quot;"></a></h3><p> <strong>HotkeyOptions</strong>: <code>Object</code></p><p>An object that configures a <a href="./hotkey#hotkey">Hotkey</a>.</p><table><thead><tr><th style="text-align:left;">Name</th><th style="text-align:left;">Type</th><th style="text-align:left;">Description</th></tr></thead><tbody><tr><td style="text-align:left;"><code>description</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<code>string</code>&gt;</td><td style="text-align:left;">The description of this hotkey, to display in the settings.</td></tr><tr><td style="text-align:left;"><code>enabled?</code></td><td style="text-align:left;"><a href="./../util/computed#computable"><code>Computable</code></a>&lt;<code>boolean</code>&gt;</td><td style="text-align:left;">Whether or not this hotkey is currently enabled.</td></tr><tr><td style="text-align:left;"><code>key</code></td><td style="text-align:left;"><code>string</code></td><td style="text-align:left;">The key tied to this hotkey</td></tr><tr><td style="text-align:left;"><code>onPress</code></td><td style="text-align:left;"><code>VoidFunction</code></td><td style="text-align:left;">What to do upon pressing the key.</td></tr></tbody></table><h4 id="defined-in-1" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in-1" aria-label="Permalink to &quot;Defined in&quot;"></a></h4><p><a href="https://github.com/profectus-engine/Profectus/blob/8c0a0c4/src/features/hotkey.tsx#L26" target="_blank" rel="noreferrer">profectus/src/features/hotkey.tsx:26</a></p><h2 id="type-aliases" tabindex="-1">Type Aliases <a class="header-anchor" href="#type-aliases" aria-label="Permalink to &quot;Type Aliases&quot;"></a></h2><h3 id="generichotkey" tabindex="-1">GenericHotkey <a class="header-anchor" href="#generichotkey" aria-label="Permalink to &quot;GenericHotkey&quot;"></a></h3><p>Ƭ <strong>GenericHotkey</strong>: <a href="./feature#replace"><code>Replace</code></a>&lt;<code>Hotkey</code>&lt;<a href="./hotkey#hotkeyoptions"><code>HotkeyOptions</code></a>&gt;, { <code>enabled</code>: <a href="./../util/computed#processedcomputable"><code>Processed