Skip to content

Add desktop shell support for text navigation key combinations #30725

Open

Description

@stuartmorgan-g

On macOS, typing cmd+right invokes moveToRightEndOfLine: These methods are already received by doCommandBySelector: so we we just need to implement the logic.

On glfw we could use modifier flags https://www.glfw.org/docs/latest/group__mods.html#ga14994d3196c290aaa347248e51740274

Activity

  1. stuartmorgan-g commented on May 6, 2019

    @stuartmorgan-g
    ContributorAuthor

    To clarify, the original description here is one such shortcut, but there are many that we should support across the desktop platforms. Other examples include things like forward/back word, delete word, etc.

  2. krisgiesing commented on May 6, 2019

    @krisgiesing
    Contributor

    Here's a list I compiled for NSResponder:

    (void)moveBackwardAndModifySelection nullable id)sender;
    (void)moveForwardAndModifySelection nullable id)sender;
    (void)moveWordForwardAndModifySelection nullable id)sender;
    (void)moveWordBackwardAndModifySelection nullable id)sender;
    (void)moveUpAndModifySelection nullable id)sender;
    (void)moveDownAndModifySelection nullable id)sender;
    (void)moveToBeginningOfLineAndModifySelection nullable id)sender;
    (void)moveToEndOfLineAndModifySelection nullable id)sender;
    (void)moveToBeginningOfParagraphAndModifySelection nullable id)sender;
    (void)moveToEndOfParagraphAndModifySelection nullable id)sender;
    (void)moveToEndOfDocumentAndModifySelection nullable id)sender;
    (void)moveToBeginningOfDocumentAndModifySelection nullable id)sender;
    (void)pageDownAndModifySelection nullable id)sender;
    (void)pageUpAndModifySelection nullable id)sender;
    (void)moveParagraphForwardAndModifySelection nullable id)sender;
    (void)moveParagraphBackwardAndModifySelection nullable id)sender;
    (void)moveRightAndModifySelection nullable id)sender;
    (void)moveLeftAndModifySelection nullable id)sender;
    (void)moveWordRightAndModifySelection nullable id)sender;
    (void)moveWordLeftAndModifySelection nullable id)sender;
    (void)moveToLeftEndOfLineAndModifySelection nullable id)sender NS_AVAILABLE_MAC(10_6);
    (void)moveToRightEndOfLineAndModifySelection nullable id)sender NS_AVAILABLE_MAC(10_6);
    
  3. stuartmorgan-g commented on Jun 26, 2019

    @stuartmorgan-g
    ContributorAuthor

    See #34949 for some more specific cases that should be supported.

  4. gazialankus commented on Aug 5, 2019

    @gazialankus
    Contributor

    Paste shortcuts do not work either.

  5. added this to the milestone on Aug 13, 2019
  6. gspencergoog commented on Nov 4, 2019

    @gspencergoog
    Contributor

    I'm curious: why do these key bindings need to be added on the engine side? Why can't we handle these keys on the framework side and just have it tell the shell how to modify the selection, etc.?

  7. 44 remaining items

  8. removed their assignment
    on Jun 30, 2023
  9. added
    fyi-macosFor the attention of macOS platform team
    and removed on Jun 5, 2024
  10. flutter-triage-bot commented on Jun 7, 2024

    @flutter-triage-bot

    The triaged-desktop label is irrelevant if there is no team-desktop label or fyi-desktop label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: desktopRunning on desktopc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Fluttere: glfwGLFW desktop embeddingengineflutter/engine related. See also e: labels.platform-linuxBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions