Skip to content

Add keyboard shortcut overlay to DevTools #1608

Description

@kenzieschmoll

This could be present (and useful) on every screen as an app-wide footer. A feature like this could help with discoverability of keyboard shortcuts (like with WASD in timeline or Ctrl + O for memory / debugger).

DartPad has this feature:
Screen Shot 2020-02-06 at 12 55 42 PM
Screen Shot 2020-02-06 at 12 55 27 PM

Activity

  1. added this to the Backlog milestone on Feb 6, 2020
  2. Levi-Lesches commented on Oct 25, 2023

    @Levi-Lesches

    Seeing as this is marked good first issue, can someone refer to a list of keyboard shortcuts the UI should show?

  3. kenzieschmoll commented on Oct 25, 2023

    @kenzieschmoll
    MemberAuthor

    Thanks for picking this up! Each Screen object in DevTools has a method that can be overridden buildKeyboardShortcuts to return a set of keyboard shortcuts for the screen. Right now, only the Debugger screen has a non-empty set: https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart/#L55-L58

    My suggestion for implementing this is to add an icon button like the screenshot above that is to the right of "Read docs" and "Watch tutorial" in the bottom left of the DevTools footer. This action should only show for a screen if it has a non-empty set of keyboard shortcuts.

    When pressed it can launch a dialog like the one pictured above, that builds from the set of keyboard shortcuts provided by the Screen object.

  4. ahmadrafidev commented on Jan 22, 2024

    @ahmadrafidev

    any updates on this issue?

  5. kenzieschmoll commented on Jan 22, 2024

    @kenzieschmoll
    MemberAuthor

    This is no active work on this issue to my knowledge. @ahmadrafidev feel free to pick it up if you are looking for ways to contribute. Thanks!

  6. ahmadrafidev commented on Jan 25, 2024

    @ahmadrafidev

    Of course, I would love to solve this problem! May I know specifically, what command shortcuts need to be in this feature other than those in the image above?

  7. kenzieschmoll commented on Jan 29, 2024

    @kenzieschmoll
    MemberAuthor

    The screenshot above was just an example of how we might surface the keyboard shortcuts (this is an example from dart pad).

    The keyboard shortcuts to show for each screen should be defined by the screen's buildKeyboardShortcuts method:
    https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart/#L52

  8. added
    P3issues we think are valid but not important
    devtools-cross-screenIssues that affect multiple DevTools screens, i.e. shared functionality and widgets
    cost: mediumMedium engineering cost to implement
    on Oct 24, 2024
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 we think are valid but not importantcost: mediumMedium engineering cost to implementdevtools-cross-screenIssues that affect multiple DevTools screens, i.e. shared functionality and widgetsgood first issueGood issues for new contributorspolishtype-enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions