Show keyboard shortcuts in mouseovers

Use case or problem

Learning and reviewing keyboard shortcuts.
The toolbar on the left has nice mouseovers that show the name of the function that’s linked to each button.
Learning keyboard shortcuts is kind of hard so I fall back to the mouse from time to time.

Proposed solution

Add shortcuts to the mouseovers.
For example, the mouseover for Settings should be
Settings (⌘,)

Current workaround (optional)

⌘P to see all the commands and scroll and search, or look at the keyboards in settings.

12 Likes

This would be a big win for discoverability and accessibility. I just came across this same issue independently and came to the forum to find that someone already posted about it. I think this is crucial not just for experienced users but also for noobs like myself who are trying to very quickly get up to speed with Obsidian and develop fast workflows.

As an example, I wanted to open the Obsidian settings menu (cog in the bottom left), so I hovered my mouse over the cog icon and saw the text “Settings”. I wanted to use a keyboard shortcut though, so I did an internet search for Obsidian shortcuts and found that I could use Ctrl+, (control and comma) on Linux to open the settings menu. But I wish this was discoverable via tooltip! E.g, I wish the tooltip said “Settings (Ctrl+,)” rather than just “Settings” because that keyboard shortcut exists and would have been useful.

Other apps do this. I’ve included a screenshot from Visual Studio Code. You can clearly see that VS Code includes the shortcut alongside the other hover text in parenthesis if a shortcut exists. E.g., the tooltip text for the “Explorer” menu button in VS Code is “Explorer (Ctrl+Shift+E)” rather than just “Explorer” This also makes it intuitive for users to know whether a given button currently has a keyboad shortcut assigned to it.


Screenshot from 2022-11-15 16-18-25

1 Like

This must be the easiest feature request to implement that I’ve ever seen. No code needs to be changed—it’s just a matter of adding a few characters to the text of each tooltip.

1 Like

There’s a potential gotcha if the user customizes their keyboard shortcuts. I don’t think you can just hard-code the character strings to include the (static) shortcut bindings, because then if the user customizes their shortcut bindings later, the shortcuts displayed in the tooltip text wouldn’t match the bindings set by the user.

But the code that currently populates the tooltip text could certainly be modified to retrieve the user’s active shortcut bindings as need be. If no binding is set for a certain UI menu button, no binding should be displayed in the tooltip for that menu item.

The only other gotcha that comes to mind concerns internationalization and localization (i18n and L10n respectively). Just conjecture, but Arabic users might prefer right-to-left layouts with the shortcut listed “before” the menu item text. But that’s also probably an implementation detail to be considered within the context of existing localization code.

In general though I agree, this would be a relatively small fix that would have a big impact on how people use the app

1 Like

There’s a potential gotcha if the user customizes their keyboard shortcuts.

That’s true, although generally if someone customizes a keybinding, they already know it because it’s their own, so they’re unlikely to bother mousing over to the icon to invoke the command—and even if they do they’ll probably ignore the tooltip.

I agree it would be more elegant to have the tooltips update to show any custom shortcuts, but doing that would take a lot more coding time, and simply adding the default shortcut to the text would offer 99% of the benefit and be a big help to new users.

If only Obsidian was open source, I could make a pull request :pensive:

1 Like