Skip to content

Commit 546a901

Browse files
committed
Add digit inputs for score
1 parent 3b330b2 commit 546a901

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cue-client/src/components/study-stack.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ function CardFlipper({
124124
setFlipped((prev) => !prev);
125125
setShowScores(true);
126126
}
127+
if (e.key === '1') {
128+
e.preventDefault();
129+
updateScore(0);
130+
} else if (e.key === '2') {
131+
e.preventDefault();
132+
updateScore(1);
133+
} else if (e.key === '3') {
134+
e.preventDefault();
135+
updateScore(2);
136+
}
127137
};
128138
document.addEventListener('keydown', handleKeyDown);
129139
return () => document.removeEventListener('keydown', handleKeyDown);

0 commit comments

Comments
 (0)