Fix ctrl-click not working quite right on Macs

This commit is contained in:
Eevee (Evelyn Woods) 2021-01-05 17:18:09 -07:00
parent 05e8f05b41
commit c6d9eb3271

View File

@ -327,7 +327,8 @@ class MouseOperation {
this.editor = editor;
this.target = target;
this.button_mask = MOUSE_BUTTON_MASKS[ev.button];
this.alt_mode = ev.button > 0;
// Check .buttons instead of .button because Macs use ctrl-click to mean right click
this.alt_mode = !! (ev.buttons & 2);
this.modifier = null; // or 'shift' or 'ctrl' (ctrl takes precedent)
this._update_modifier(ev);