Pure node rendering (#443)
This commit is contained in:
committed by
GitHub
parent
5ce5e5ac1e
commit
7f6e1f420e
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 ||
|
||||
|
Reference in New Issue
Block a user