Closed Frenzie closed 3 months ago
Hey, thanks a ton for the initiative! I'll give this a quick test but I think that it looks good so far.
Somewhere popped up the idea, that it would be great if the user could select the shortcuts for the items. Then they could be more easy to remember, like F for Firefox. But I think that your implementation could simply be the default behavior and it could become possible in the future to override the shortcuts.
This would also make this easier to discover, because you would see each item's shortcut in the editor. For now, this would be kind of a "hidden feature", I guess.
That sounds like a cool idea, but indeed for now I'm primarily interested in the generic use case, which means not needing to manually set up anything to be able to use the keyboard, and to be predictable.
One issue I see is that this currently interferes with turbo-mode if the hotkey which opened the menu involves one of the item-shortcuts. To reproduce:
I think this could be solved by checking whether any modifier key is currently pressed and only activate an item if no modifier is pressed. What do you think?
Thanks again! And yeah, prettier is not always pretty but it's definitely much better than no formatter at all. At least we get a consistent style this way.
The principle is simple.
0123456789abcdefghijklmnopqrstuvwxyz
is used as an index to select a menu entry. In https://github.com/Frenzie/nimbler I also used uppercase should lowercase run out, but I don't believe that's necessary here.0 closes the menu at the root or goes back one level when deeper down.
The remainder is automatically assigned a clockwise number, starting from the topmost item.
References #291. To close it, presumably some display is desired as well.