Electron.NET icon indicating copy to clipboard operation
Electron.NET copied to clipboard

Electron Menu Keyboard shortcuts were not working as expected

Open AvinashSuresh12 opened this issue 3 years ago • 1 comments

I have created custom menu items for my Electron app and implemented Alt keyboard shortcut by adding "&" before the character. So only it will display the Underscore on the respective character. But for this I am facing few issues

1.After pressing Alt key, my "File" menu is selected and underscore also displayed under "F" (Which is expected). But we have to click Alt+F to expand the list of submenu under File. whereas my expected behavior is I need to expand the submenu by clicking F alone instead of Alt+F.

2.When clicking esc, the underscore is still present in the File Menu. But Underscore should get removed once the esc char is pressed.

3.Clicking on "File" menu manually and click outside. My expected behavior is Submenu items should be collapsed and "File" menu item shouldn't have any underscore in it. But in the actual behavior the underscore is still present. But this is not the expected one. image

4.Submenu which don't have "&" symbol also responsive to the shortcut keys.

Please let me know is the above issues are already fixed or am I missing anything here?

AvinashSuresh12 avatar Apr 05 '22 10:04 AvinashSuresh12

The menuing in electron.net is basically what is done in electron itself with just some pattern wrappers to allow a dotnet object to be translated into js objects.

Id look to see if your issue is mentioned inside electron github issues.

danatcofo avatar Apr 06 '22 03:04 danatcofo

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

GregorBiswanger avatar Mar 28 '23 10:03 GregorBiswanger