1import { Mac } from "../src/Mac.ts";
2import { SpeedEditor } from "../src/SpeedEditor.ts";
3
4const editor = await SpeedEditor.open();
5const mac = await Mac.open();
6
7editor.on("jog", (ev) => {
8 console.info(ev);
9});
10editor.on("keypress", (key) => {
11 console.info(`Press ${key}`);
12
13 if (key === "smartInsert") {
14 mac.focusApp("com.google.Chrome");
15 }
16});
17editor.onDoublePress("transition", () => {
18 console.info("(double press) \"Title\"");
19});
20
21console.info("init");
22mac.on("app-change", (bundle) => {
23 console.info(`Switch to ${bundle}`);
24});