Skip to content

Commit

Permalink
Use touchstart for keyboard. Closes #372
Browse files Browse the repository at this point in the history
  • Loading branch information
mdirolf committed May 6, 2024
1 parent c4f1b03 commit 3f5eb91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/components/Keyboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ const Key = (props: KeyProps) => {
props.onKeypress(props.keyStroke);
e.preventDefault();
}}
onTouchStart={(e) => {
props.onKeypress(props.keyStroke);
e.preventDefault();
}}
onTouchEnd={(e) => {
e.preventDefault();
}}
>
{props.display !== undefined ? props.display : props.keyStroke}
</button>
Expand Down

0 comments on commit 3f5eb91

Please sign in to comment.