Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Display multi-keystroke key bindings in menu item's label #19423
This pull request introduces a workaround to a limitation in Electron's accelerator system, which refutes to display shortcuts for a menu item when it is a multi-keystroke key binding.
I performed a brief investigation of what it would take to fix this upstream in Electron, but unfortunately the shortcut code lives within
Instead, with these changes, multi-keystroke keybindings will be displayed next to the item's label:
This is clearly a suboptimal choice in terms of how these shortcuts will be rendered, but there is at least one precedent for it in Visual Studio Code (see microsoft/vscode#30617). Considering that it does not impact the UX in any way (shortcuts will continue to work as they did before), I think this is an acceptable workaround that will help users find which keystrokes a menu item maps to.
rafeca left a comment
The solution is not ideal, but it's a nice workaround.
I could not find any related issue on Electron about this, should we create one and link to it on the comment?