mellobacon / Nucleus

A text editor made with Tauri
GNU General Public License v3.0
156 stars 28 forks source link

[FEATURE] Shortcuts #77

Open mellobacon opened 1 year ago

mellobacon commented 1 year ago

Is your feature request related to a problem? Please describe. There are no working shortcuts except for the default document ones (copy, paste etc)

Describe the solution you'd like Add shortcuts for each menu item in the header and context menus where applicable

Additional context Tauri has an api called global shortcuts. This works but the issue is because its global it works even when the window is minimized and also blocks shortcuts for other apps. Need to find a workaround for this or a custom implementation

oliverbooth commented 1 year ago

Some things to keep in mind:

Menus should be accessible using Alt+\<key>, where the key in question is whichever is designated as the activation key for the menu in question. Holding Alt in any desktop app should underline one unique letter.

Example from VS Code: image

This hints that using the shortcut Alt+F will activate the File menu. If Alt is held while a menu is open thereafter, the options in that menu should also have uniquely underlined letters. For example, the X in Exit. This means you can exit the app by using Alt+F, followed by the X key. image

mellobacon commented 1 year ago

Some things to keep in mind:

Menus should be accessible using Alt+, where the key in question is whichever is designated as the activation key for the menu in question. Holding Alt in any desktop app should underline one unique letter.

Example from VS Code: image

This hints that using the shortcut Alt+F will activate the File menu. If Alt is held while a menu is open thereafter, the options in that menu should also have uniquely underlined letters. For example, the X in Exit. This means you can exit the app by using Alt+F, followed by the X key. image

@oliverbooth Oh this is a good point. I haven't done keyboard navigation just yet. This will come soon though