mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Pure node rendering (#443)
This commit is contained in:
parent
5ce5e5ac1e
commit
7f6e1f420e
12 changed files with 647 additions and 84 deletions
11
src/keys.ts
11
src/keys.ts
|
@ -6,13 +6,14 @@ export const KEYS = {
|
|||
ENTER: "Enter",
|
||||
ESCAPE: "Escape",
|
||||
DELETE: "Delete",
|
||||
BACKSPACE: "Backspace"
|
||||
BACKSPACE: "Backspace",
|
||||
get META() {
|
||||
return /Mac|iPod|iPhone|iPad/.test(window.navigator.platform)
|
||||
? "metaKey"
|
||||
: "ctrlKey";
|
||||
}
|
||||
};
|
||||
|
||||
export const META_KEY = /Mac|iPod|iPhone|iPad/.test(window.navigator.platform)
|
||||
? "metaKey"
|
||||
: "ctrlKey";
|
||||
|
||||
export function isArrowKey(keyCode: string) {
|
||||
return (
|
||||
keyCode === KEYS.ARROW_LEFT ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue