diff --git a/repl/src/App.tsx b/repl/src/App.tsx index 8a5dd3a6..c8e77932 100644 --- a/repl/src/App.tsx +++ b/repl/src/App.tsx @@ -56,8 +56,8 @@ function App() { } } }; - document.addEventListener('keypress', handleKeyPress); - return () => document.removeEventListener('keypress', handleKeyPress); + window.addEventListener('keydown', handleKeyPress); + return () => window.removeEventListener('keydown', handleKeyPress); }, [pattern, code]); useWebMidi({