MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / keyboardShortcut

Method keyboardShortcut

src/monogatari.ts:1771–1773  ·  view source on GitHub ↗

* @static keyBoardShortcut - Register a new callback for a custom keyboard * shortcut * * @param {string|Array } shortcut - Sequence of keys that represent * the shortcut * @param {function} callback - The function to run when that sequence of keys * is pressed * * @re

(shortcut: string | string[], callback: (this: VisualNovelEngine, event: KeyboardEvent, element: DOM) => void)

Source from the content-addressed store, hash-verified

1769 * @returns {void}
1770 */
1771 static keyboardShortcut (shortcut: string | string[], callback: (this: VisualNovelEngine, event: KeyboardEvent, element: DOM) => void): void {
1772 return _keyboardShortcut (this.asEngine (), shortcut, callback);
1773 }
1774
1775 static upgrade (oldVersion: string, newVersion: string, callbacks: { storage?: (oldData: unknown) => unknown; replaceStorage?: boolean }): void {
1776 return _upgrade(this.asEngine(), oldVersion, newVersion, callbacks);

Callers 1

bindMethod · 0.95

Calls 1

asEngineMethod · 0.95

Tested by

no test coverage detected