mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-16 16:49:44 +02:00
transitioning to ts
This commit is contained in:
11
src/scripts/hotkeys.ts
Normal file
11
src/scripts/hotkeys.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import hotkeyjs, { HotkeysEvent } from "hotkeys-js";
|
||||
|
||||
export const addHotkey = function (
|
||||
keys: string,
|
||||
func: (event?: KeyboardEvent, args?: HotkeysEvent) => void
|
||||
) {
|
||||
hotkeyjs(keys, function (event, args) {
|
||||
event.preventDefault();
|
||||
func(event, args);
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user