mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-11 22:35:05 +02:00
12 lines
273 B
TypeScript
12 lines
273 B
TypeScript
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);
|
|
});
|
|
};
|