implement copy paste
This commit is contained in:
parent
39a229bf21
commit
ec49c47b39
14 changed files with 580 additions and 234 deletions
|
|
@ -14,6 +14,7 @@ import { TopPanel } from "./TopPanel";
|
|||
import { RTHistory } from "./RTHistory";
|
||||
import { AST } from "./AST";
|
||||
import { TraceableError } from "../statecharts/parser";
|
||||
import { getKeyHandler } from "./shortcut_handler";
|
||||
|
||||
export function App() {
|
||||
const [mode, setMode] = useState<InsertMode>("and");
|
||||
|
|
@ -83,6 +84,14 @@ export function App() {
|
|||
|
||||
}, [time, rtIdx]);
|
||||
|
||||
useEffect(() => {
|
||||
const onKeyDown = getKeyHandler(setMode);
|
||||
window.addEventListener("keydown", onKeyDown);
|
||||
return () => {
|
||||
window.removeEventListener("keydown", onKeyDown);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return <Stack sx={{height:'100vh'}}>
|
||||
{/* Top bar */}
|
||||
<Box
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue