Skip to content

keybindings

keybindings

Type Aliases

Key

type Key = 
  | "backspace"
  | "tab"
  | "enter"
  | "shift(left)"
  | "shift(right)"
  | "ctrl(left)"
  | "ctrl(right)"
  | "alt(left)"
  | "alt(right)"
  | "pause/break"
  | "caps lock"
  | "escape"
  | "space"
  | "page up"
  | "page down"
  | "end"
  | "home"
  | "left arrow"
  | "up arrow"
  | "right arrow"
  | "down arrow"
  | "print screen"
  | "insert"
  | "delete"
  | "0"
  | "1"
  | "2"
  | "3"
  | "4"
  | "5"
  | "6"
  | "7"
  | "8"
  | "9"
  | "a"
  | "b"
  | "c"
  | "d"
  | "e"
  | "f"
  | "g"
  | "h"
  | "i"
  | "j"
  | "k"
  | "l"
  | "m"
  | "n"
  | "o"
  | "p"
  | "q"
  | "r"
  | "s"
  | "t"
  | "u"
  | "v"
  | "w"
  | "x"
  | "y"
  | "z"
  | "left window key"
  | "right window key"
  | "select key (Context Menu)"
  | "numpad 0"
  | "numpad 1"
  | "numpad 2"
  | "numpad 3"
  | "numpad 4"
  | "numpad 5"
  | "numpad 6"
  | "numpad 7"
  | "numpad 8"
  | "numpad 9"
  | "multiply"
  | "add"
  | "subtract"
  | "decimal point"
  | "divide"
  | "f1"
  | "f2"
  | "f3"
  | "f4"
  | "f5"
  | "f6"
  | "f7"
  | "f8"
  | "f9"
  | "f10"
  | "f11"
  | "f12"
  | "num lock"
  | "scroll lock"
  | "audio volume mute"
  | "audio volume down"
  | "audio volume up"
  | "media player"
  | "launch application 1"
  | "launch application 2"
  | "semi-colon"
  | "equal sign"
  | "comma"
  | "dash"
  | "period"
  | "forward slash"
  | "Backquote/Grave accent"
  | "open bracket"
  | "back slash"
  | "close bracket"
  | "single quote";

Defined in: packages/ui/build/keybindings/keybindings.svelte.d.ts:25


Options

type Options = object;

Defined in: packages/ui/build/keybindings/keybindings.svelte.d.ts:1

Properties

Property Type Description Defined in
alt? boolean Should the Alt key be pressed packages/ui/build/keybindings/keybindings.svelte.d.ts:11
callback (e) => void Function to be called when the shortcut is pressed packages/ui/build/keybindings/keybindings.svelte.d.ts:5
ctrl? boolean Should the Ctrl / Command key be pressed packages/ui/build/keybindings/keybindings.svelte.d.ts:9
event? "keydown" | "keyup" | "keypress" Event to use to detect the shortcut Default 'keydown' packages/ui/build/keybindings/keybindings.svelte.d.ts:3
exactMatch? boolean Control whether only the exact specified keys should be pressed (no additional modifiers) Default true packages/ui/build/keybindings/keybindings.svelte.d.ts:19
key Key Which key should be pressed packages/ui/build/keybindings/keybindings.svelte.d.ts:13
preventDefault? boolean Control whether or not the shortcut prevents default behavior Default true packages/ui/build/keybindings/keybindings.svelte.d.ts:15
shift? boolean Should the Shift key be pressed packages/ui/build/keybindings/keybindings.svelte.d.ts:7
stopPropagation? boolean Control whether or not the shortcut stops propagation Default false packages/ui/build/keybindings/keybindings.svelte.d.ts:17

Variables

shortcut

const shortcut: (node, options) => object;

Defined in: packages/ui/build/keybindings/keybindings.svelte.d.ts:21

Parameters

Parameter Type
node HTMLElement
options | Options[] | Options

Returns

object

destroy()
destroy(): void;
Returns

void

update()
update(newOptions): void;
Parameters
Parameter Type
newOptions | Options | Options[]
Returns

void