Skip to content

Create CommandOrControl so ctrl+c in Windows == command+c in Mac #83733

@bernaferrari

Description

@bernaferrari

LogicalKeyboardKey's controlLeft on Windows and Linux means ctrl (like ctrl+c), but on macOS control is something else entirely different. For things like ctrl+c, the correct is command+c, which is Windows' Windows key (metaLeft). This gets instantly confusing.

I've seen apps with shortcuts broken because the developer only tested on Windows/Mac and didn't realize control works completely different across both.

My suggestions: somehow we could have a LogicalKeyboardKey "correct/expected" control and meta so developers and users wouldn't be confused or even worry about it. This affects even Flutter Web. No one is going to do if (Platform.macOS) metaLeft else controlLeft because it is going to take too long for them to realize this is necessary. It seems like a bug, even though the logical key is 100% correct (from logical point of view).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions