Skip to content

[Proposal][Desktop] Let "ESC" key de-select currently selected item #94965

Open

Description

@Seirdy

Use case

Users expect de-selection to work like it does in other programs.

Selected items (including selected text, widgets, and tab-focused items) all require the mouse to de-select, which is inconvenient. Other desktop programs typically allow de-selecting items with the ESC key.

Proposal

Selected items should be de-selected when a user presses the ESC key. This includes:

  • Selected text
  • Selected (long-pressed) widgets: see screenshot below
  • Tab-focused buttons

pic

I had previously filed a ticket for Fluffychat and was directed to file it here.

I observed the lack of support for ESC deselection on the Linux desktop on Wayland, but I think it should be universal.

Activity

  1. changed the title [-]Desktop: have "ESC" key de-select currently selected item[/-] [+][Proposal][Desktop] Let "ESC" key de-select currently selected item[/+] on Dec 10, 2021
  2. added
    a: text inputEntering text in a text field or keyboard related problems
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    and removed
    in triagePresently being triaged by the triage team
    on Dec 10, 2021
  3. HansMuller commented on Dec 13, 2021

    @HansMuller
    Contributor

    Interesting proposal. CC @gspencergoog

  4. added
    P3Issues that are less important to the Flutter project
    on Dec 16, 2021
  5. justinmc commented on Feb 11, 2022

    @justinmc
    Contributor

    @Seirdy Could you provide a code sample to reproduce this?

    If the selection has caused the focus to change and we can receive the escape key, then I think this could be a straightforward fix by firing something like a DismissIntent.

  6. Seirdy commented on Feb 11, 2022

    @Seirdy
    Author
  7. markusaksli-nc commented on Feb 15, 2022

    @markusaksli-nc
    Contributor

    So aside from #98163 and #84416 what else is missing this? It would be helpful to aggregate places where this doesn't work as expected.

    I'm slightly concerned about how far exactly this should go since not everything is consistent on desktop. Would it be fair to expect ESC to de-select selected text? Should it unfocus a focused text field if no text is selected? I'm not sure what the general case is for these but playing around with the browser and my IDE there are conflicting approaches. It's certainly doable by just going through a few checks in EditableTextState.

    Also am I missing something or does pressing tab in EditableText just always navigate instead of entering anything?

  8. 2 remaining items

  9. removed their assignment
    on Mar 18, 2022
  10. Seirdy commented on Jul 7, 2022

    @Seirdy
    Author

    This could also be considered an accessibility issue, as failing to de-select an item would violate all three levels of WCAG 2.2's Guideline 2.1 (Keyboard Accessible). One of Flutter's selling points is accessibility; this makes anything that disqualifies it from the WCAG's most lenient conformance level a big deal.

  11. 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

    P3Issues that are less important to the Flutter projecta: desktopRunning on desktopa: error messageError messages from the Flutter frameworka: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: material_uimaterial_ui package in flutter/packagesteam-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