openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.35k stars 1.2k forks source link

Add `command+k` action shortcut #8801

Open tordans opened 2 years ago

tordans commented 2 years ago

Command + K is an emerging standard to access a search and action menu on websites and webapps. See also https://css-tricks.com/kbar/

I would love to see it in iD as well.

For example, I tend to forget the shortcut for wireframe mode W. I would love to hit cmd+k and type wire to select "Style options: No fill (Wireframe view)".

For starters, all the actions that are documented in the help panel could be added to the command-list.

1ec5 commented 2 years ago

This pattern is emerging despite Ctrl+K (Command+K) being the shortcut for the search bar in Firefox and some more minor browsers. So far, most of the sites I’ve seen this feature on are applications that a user would tend to keep in a pinned tab, making the address bar and search bar irrelevant, though GitHub is a recent (developer-focused) exception.

For starters, all the actions that are documented in the help panel could be added to the command-list.

Sort of along these lines, would it make sense to add some way to trigger an action from the keyboard shortcut panel itself? The Help menu in macOS has a search bar that you can use it to quickly access any menu item by entering a search term. Anecdotally, in user studies of unrelated Mac applications, I’ve seen people gravitate toward this Help menu search bar as a way to avoid having to remember the menu hierarchy.

As iD gains new features, I think a filter bar would be a useful escape hatch for users, whether as a standalone modal or integrated into an existing UI.

forteller commented 2 years ago

This pattern is emerging despite Ctrl+K (Command+K) being the shortcut for the search bar in Firefox

Thankfully Ctrl+J also works :) For me Ctrl+K means either search (I've not gotten used to Ctrl+J) or insert link (often used in text areas, like in Wikipedia and WordPress.

1ec5 commented 2 years ago

Ah, that must be a Windows/Linux thing. On macOS as of Firefox 94 (and since at least Firefox 2), Command+J opens the Library window to the Downloads list.