Skip to content
Snippets Groups Projects
Commit 949f5207 authored by Alexander Rose's avatar Alexander Rose
Browse files

add ModifiersKeys.areNone

parent a1da374b
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ Note that since we don't clearly distinguish between a public and private interf
## [Unreleased]
- Remove `camera.far` doubeling workaround
- Add `ModifiersKeys.areNone` helper function
## [v3.33.0] - 2023-04-02
......
......@@ -76,12 +76,16 @@ export type ModifiersKeys = {
meta: boolean
}
export namespace ModifiersKeys {
export const None = create();
export const None: Readonly<ModifiersKeys> = create();
export function areEqual(a: ModifiersKeys, b: ModifiersKeys) {
return a.shift === b.shift && a.alt === b.alt && a.control === b.control && a.meta === b.meta;
}
export function areNone(a: ModifiersKeys) {
return areEqual(a, None);
}
export function size(a?: ModifiersKeys) {
if (!a) return 0;
let ret = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment