feat(nds): add pressed state for all buttons
This commit is contained in:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user