Launch the command palette using a three finger tap
This commit is contained in:
parent
5f90d7244a
commit
c9857e4b95
@ -6,7 +6,7 @@ import {
|
|||||||
import { closeBrackets, closeBracketsKeymap } from "@codemirror/autocomplete";
|
import { closeBrackets, closeBracketsKeymap } from "@codemirror/autocomplete";
|
||||||
import { indentWithTab, standardKeymap } from "@codemirror/commands";
|
import { indentWithTab, standardKeymap } from "@codemirror/commands";
|
||||||
import { history, historyKeymap } from "@codemirror/commands";
|
import { history, historyKeymap } from "@codemirror/commands";
|
||||||
import { bracketMatching, syntaxHighlighting } from "@codemirror/language";
|
import { syntaxHighlighting } from "@codemirror/language";
|
||||||
import { searchKeymap } from "@codemirror/search";
|
import { searchKeymap } from "@codemirror/search";
|
||||||
import { EditorSelection, EditorState } from "@codemirror/state";
|
import { EditorSelection, EditorState } from "@codemirror/state";
|
||||||
import {
|
import {
|
||||||
@ -60,7 +60,6 @@ import { FilterOption, PageMeta } from "@silverbulletmd/common/types";
|
|||||||
import { syntaxTree } from "@codemirror/language";
|
import { syntaxTree } from "@codemirror/language";
|
||||||
import sandboxSyscalls from "@plugos/plugos/syscalls/sandbox";
|
import sandboxSyscalls from "@plugos/plugos/syscalls/sandbox";
|
||||||
import { eventSyscalls } from "@plugos/plugos/syscalls/event";
|
import { eventSyscalls } from "@plugos/plugos/syscalls/event";
|
||||||
// import globalModules from "../common/dist/global.plug.json";
|
|
||||||
|
|
||||||
class PageState {
|
class PageState {
|
||||||
constructor(
|
constructor(
|
||||||
@ -168,6 +167,15 @@ export class Editor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.addEventListener("touchstart", (ev) => {
|
||||||
|
// Launch the command palette using a three-finger tap
|
||||||
|
if (ev.touches.length > 2) {
|
||||||
|
ev.stopPropagation();
|
||||||
|
ev.preventDefault();
|
||||||
|
this.viewDispatch({ type: "show-palette" });
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get currentPage(): string | undefined {
|
get currentPage(): string | undefined {
|
||||||
|
Loading…
Reference in New Issue
Block a user