diff --git a/apps/frontend/src/components/MainActionBar/StartButton.tsx b/apps/frontend/src/components/MainActionBar/StartButton.tsx index 61cd761d..8bae46f1 100644 --- a/apps/frontend/src/components/MainActionBar/StartButton.tsx +++ b/apps/frontend/src/components/MainActionBar/StartButton.tsx @@ -1,9 +1,14 @@ import { Button, Icon } from '@chakra-ui/react'; import { PauseFill, PlayFill } from 'react-bootstrap-icons'; import { useData } from '../../context/DataContext'; +import * as React from 'react'; +import { useHotkey } from '../../hooks/useHotkey'; export const StartButton = () => { const { hasValidData, isRunning, start, stop } = useData(); + + useHotkey('Space', () => (isRunning ? stop() : start())); + if (isRunning) return (