You've already forked AstralRinth
forked from didirus/AstralRinth
Migrate to Turborepo (#1251)
This commit is contained in:
10
apps/frontend/src/helpers/events.ts
Normal file
10
apps/frontend/src/helpers/events.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Checks if any of the modifier keys is down for the event.
|
||||
* @param e Event that is triggered with the state of modified keys.
|
||||
* @returns Whether any of the modifier keys is pressed.
|
||||
*/
|
||||
export function isModifierKeyDown(
|
||||
e: Pick<KeyboardEvent, 'ctrlKey' | 'altKey' | 'metaKey' | 'shiftKey'>
|
||||
) {
|
||||
return e.ctrlKey || e.altKey || e.metaKey || e.shiftKey
|
||||
}
|
||||
Reference in New Issue
Block a user