chore(deps): update keyboard dependency and refactor keyboard handling

This commit is contained in:
0PandaDEV 2025-05-27 14:44:14 +02:00
commit aa928f7094
No known key found for this signature in database
GPG key ID: F4C8370B55232C8E
5 changed files with 331 additions and 501 deletions

27
types/keyboard.d.ts vendored Normal file
View file

@ -0,0 +1,27 @@
import type { Key as WaraduKey, useKeyboard } from '@waradu/keyboard';
declare module '#app' {
interface NuxtApp {
$keyboard: {
listen: ReturnType<typeof useKeyboard>['listen'];
init: ReturnType<typeof useKeyboard>['init'];
Key: typeof WaraduKey;
currentOS: string;
clearAll: () => void;
};
}
}
declare module 'vue' {
interface ComponentCustomProperties {
$keyboard: {
listen: ReturnType<typeof useKeyboard>['listen'];
init: ReturnType<typeof useKeyboard>['init'];
Key: typeof WaraduKey;
currentOS: string;
clearAll: () => void;
};
}
}
export {};