mirror of
https://github.com/imezx/Warp.git
synced 2025-04-25 07:30:02 +00:00
8 lines
291 B
JavaScript
8 lines
291 B
JavaScript
|
/**
|
||
|
* 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;
|
||
|
}
|