feat(nds): add pressed state for all buttons

This commit is contained in:
2026-02-11 23:33:26 +01:00
parent 3a7f37ab5e
commit 172c78541c
57 changed files with 413 additions and 369 deletions

View File

@@ -15,3 +15,13 @@ export const mapKeyToNDS = (key: string): string | null => {
key = key.length === 1 ? key.toUpperCase() : key;
return KEY_TO_NDS_BUTTON[key] ?? null;
};
export const useMouseUp = (callback: () => void) => {
onMounted(() => {
document.addEventListener("mouseup", callback);
});
onUnmounted(() => {
document.removeEventListener("mouseup", callback);
});
};