This implements a command palette, which allows for searching and executing all commands from the menu bar. This is a followup of #59, meaning that all new shortcuts added to the menu bar will automatically be searchable from the command palette.
Usage is simple: Press Ctrl (or Cmd) + Shift + A, which will bring up a search box that can be filtered by typing. Selecting any command from that searchbox will execute that command; pressing esc will dismiss the command palette.
I had to create a parameterized overload of Search<T> so as to not break the current behavior of all search boxes while allowing for its size to change in this new use case. This can be useful in more scenarios (since right now all search boxes have the same size, we can make them have different size settings based on where they are being displayed, for example).
This implements a command palette, which allows for searching and executing all commands from the menu bar. This is a followup of #59, meaning that all new shortcuts added to the menu bar will automatically be searchable from the command palette.
Usage is simple: Press Ctrl (or Cmd) + Shift + A, which will bring up a search box that can be filtered by typing. Selecting any command from that searchbox will execute that command; pressing esc will dismiss the command palette.
I had to create a parameterized overload of
Search<T>
so as to not break the current behavior of all search boxes while allowing for its size to change in this new use case. This can be useful in more scenarios (since right now all search boxes have the same size, we can make them have different size settings based on where they are being displayed, for example).Demo: