tareqimbasher / NetPad

A cross-platform C# editor and playground.
MIT License
1.25k stars 66 forks source link

[Mac] "Meta" / Cmd key not working for keyboard shortcuts #123

Open noahkiss opened 9 months ago

noahkiss commented 9 months ago

I've tried with Ctrl+Enter on Mac and it works properly. Appears to be a Meta/Cmd button issue.

Based on the below, I think the proper way to handle it in Mac would be to give "Run" (and other commands) proper menu bar support and then map them that way, rather than mapping them in the browser window, which seems to be a shortcoming in mac that doesn't allow Cmd to be registered as a browser window listener.

https://github.com/electron/electron/blob/main/docs/tutorial/keyboard-shortcuts.md

https://github.com/electron/electron/issues/5188#issuecomment-211099102

Screenshot 2023-11-25 at 9 54 24 AM
tareqimbasher commented 9 months ago

Thank you for reporting this. Keyboard shortcuts are actually bound to the native menu bar on all OSes and they are not just bound to the browser window but I might be missing something, I'll take a look!