Skip to content

Keyboard shortcuts and actions should be supported. #31946

Closed

Description

@gspencergoog

Currently, RawKeyboardListener can listen to keyboard events, and trigger callbacks based on those events. However, on a hardware keyboard it isn't very easy to support standard keyboard shortcuts like TAB, ENTER, CTRL-Z, etc., since each control needs to be wrapped with a listener.

Flutter needs to have a shortcut mechanism which can map keys to actions, and then dispatch actions to focused widgets in order to execute them.

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    c: new featureNothing broken; request for a new capability
    on May 2, 2019
  2. self-assigned this
    on May 29, 2019
  3. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jul 26, 2019
  4. added this to the milestone on Aug 13, 2019
  5. gspencergoog commented on Oct 15, 2019

    @gspencergoog
    ContributorAuthor

    Re-landed in #42278

  6. SahajRana commented on Oct 30, 2019

    @SahajRana
    Contributor

    Hi @gspencergoog, I have recently started working on flutter & it's been great using it with the help of devs like you guys. I'm wondering how can we use keyboard shortcuts for windows like a copy/paste, redo, undo in a text widget.

  7. gspencergoog commented on Oct 30, 2019

    @gspencergoog
    ContributorAuthor

    @SahajRana, thanks for the interest. At the moment, we're still working on implementing support for those things. There is rudimentary support for cut/copy/paste on the master channel, and we're continuing to work on making it work as it should. For instance, text fields don't yet use the Shortcuts widget to implement the key bindings as they should, they still handle the raw keys themselves.

  8. SahajRana commented on Oct 30, 2019

    @SahajRana
    Contributor

    @gspencergoog, thanks for the response!. I will try using the Shortcuts widget as a workaround. I have one more issue for quite some time now, not sure should I open a new issue for it.

    In the master channel versions (above v1.9.0), for Windows, three major things got changed.

    1. The draggable widget on drag is quite glitchy when moved a little fast. (& the overall desktop app seems slow).
    2. The window UI scale has increased (I think the dpi ratio is increased from embedder).
    3. The app window on resizing doesn't refresh it's layout until I take cursor inside the window box.

    I initially thought it would be solved by time, but still on the latest version of flutter which I tried today v1.10.15-pre.330. The problem still persists due to which I have to revert back to v1.9.0. I hope you guys might help us out with this!

  9. gspencergoog commented on Oct 30, 2019

    @gspencergoog
    ContributorAuthor

    Yes, please do file issues for those. You can submit new issues here. Desktop support is still experimental, but having issues filed helps us to prioritize our work.

  10. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  11. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: desktopRunning on desktopa: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions