From c6d9eb327191cd4ed4e322ae77096ac31f0452dd Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Tue, 5 Jan 2021 17:18:09 -0700 Subject: [PATCH] Fix ctrl-click not working quite right on Macs --- js/main-editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main-editor.js b/js/main-editor.js index 0235df6..446289c 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -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);