lukehaas / RunJS

RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
https://runjs.app
2.04k stars 44 forks source link

[Feature Request] allow using the shortcut Ctrl/Cmd+Enter to invoke the "Run" command #245

Closed scoobers closed 3 years ago

scoobers commented 3 years ago

Currently, RunJS uses Ctrl/Cmd+R as the shortcut for "Run." It would be good to allow an alternate shortcut to invoke Run: Ctrl/Cmd+Enter.

Reasons:

lukehaas commented 3 years ago

Thanks, @scoobers. Happy to give this some consideration. Out of curiosity, could you name some of the code running apps where Ctrl/Cmd+Enter is the shortcut for running code?

scoobers commented 3 years ago

My mistake, looks like it's mostly the web-based code editors that do it (Replit, JSFiddle, the editors at CodeCademy and FreeCodeCamp, etc). I could've sworn I'd seen other desktop code editors do it, but from Googling around, it's not as common, or it's used to run only chunks / single lines of code, in desktop editors like RStudio, Spyder, Matlab.

Still, it'd be really nice to have the option, thanks for considering it. I love RunJS.

lukehaas commented 3 years ago

Happy to add it as an additional shortcut. Will be in the next release.

lukehaas commented 3 years ago

The Ctrl/Cmd+Enter shortcut is now supported in the latest release. @scoobers