feat: command for mac binds - #220
Open
seankmartin wants to merge 10 commits into
Open
seankmartin wants to merge 10 commits into
seankmartin wants to merge 10 commits into
Conversation
(cherry picked from commit d96fa6a)
Show Cmd rather than Ctrl in tooltips describing modifier+click bindings, matching what the Cmd-as-Ctrl remap in dispatchEventWithModifiers makes the user actually press. Left untouched: layer_bar.ts, segmentation_display_state/frontend.ts, and drag_and_drop.ts have Ctrl/Alt-only click handlers with no Cmd/Option equivalent implemented at all; fixing those requires adding new functional behavior. (cherry picked from commit 0305e21)
getDropEffectFromModifiers accepted only Ctrl to force a "move" drop, which is unusable on Mac where Ctrl+click is the system secondary-click gesture. Accept Cmd there instead, and name the modifier accordingly in the drag status message. savedModifiers already captured metaKey, so the Wayland workaround needs no change. The segment list and add-layer tooltips were label-only: Option and Cmd already worked, the text just named the wrong keys. The tool palette dropdown button advertised "control+click to create new", but its CheckboxIcon ignores modifiers and no create-new path exists, so the hint was inaccurate on every platform. Drop it.
This is a more opinionated choice than allowing both But on mac usually control + click is bound to right click And it also feels a bit less hacky to dispatch the event with meta key instead of when the event is handled to pretend that control is meta.
Now explicitly bound meta + key combos will be found first and fallback to checking on mac if any ctrl + key combo is found and uses that one if so
seankmartin
marked this pull request as ready for review
September 19, 2026 17:24
afonsobspinto
approved these changes
Sep 26, 2026
|
|
||
| const MAC_MODIFIER_SYMBOLS: Partial<Record<string, string>> = { | ||
| control: "⌘", | ||
| meta: "⌘", |
Member
There was a problem hiding this comment.
potential issue: I don't think there's any integration that uses control + X for action A and meta + X for action B. If there was, then we would get a weird UI indication on macs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds cmd as an additional bind on mac for all previous cases where control only worked. Explored cmd as the only bind but I think that's not a good idea as users may have gotten muscle memory in using control.