@scalar/api-client
Version:
the open source API testing client
10 lines (9 loc) • 320 B
JavaScript
import { onMounted as d, onBeforeUnmount as r } from "vue";
import { handleHotkeys as s } from "../helpers/handle-hotkeys.js";
const m = (e, n) => {
const o = (t) => s(t, e, n);
d(() => window.addEventListener("keydown", o)), r(() => window.removeEventListener("keydown", o));
};
export {
m as useGlobalHotKeys
};