function createHotkeysAttachment(hotkeys, commonOptions?): Attachment<HTMLElement>;Defined in: packages/svelte-hotkeys/src/createHotkeys.svelte.ts:152
Create an attachment for element-scoped hotkeys: chords, sequences, and app hotkeys listen on the attached element.
MaybeGetter<readonly CreateHotkeyDefinition[]>
MaybeGetter<CreateHotkeyCommonOptions> = {}
Attachment<HTMLElement>
<script lang="ts">
const editorKeys = createHotkeysAttachment([
{ hotkey: 'Mod+S', callback: () => save() },
{ hotkey: ['G', 'G'], callback: () => scrollToTop() },
])
</script>
<div tabindex="0" {@attach editorKeys}>Editor content</div>