This commit is contained in:
Robert Jelic
2025-02-10 07:12:35 +01:00
parent 78cfbc7510
commit 5c15cf28fa
2427 changed files with 1005260 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
/**
* Detect when an event is modified with a special key to let the browser
* trigger its default behavior.
*/
export function isModifierEvent(event) {
var isMiddleClick = event.button === 1;
return isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
}