Skip to content

Feature/shortcuts #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Dec 13, 2024
Merged

Feature/shortcuts #153

merged 26 commits into from
Dec 13, 2024

Conversation

ubidefeo
Copy link
Collaborator

@ubidefeo ubidefeo commented Dec 8, 2024

This PR implements keyboard shortcuts.
Attention has been made to disable them based on context and wether or not the user is performing operations int he REPL.

The shortcuts are also reflected in the tooltips dynamically replacing Cmd+ with Ctrl+ wether the user is on Mac OS or Windows/Linux

These shortcuts are thought to have direct single Meta Key action for the most immediate ones

Run -> Meta+r
Stop -> Meta+h (h as in halt)
Save -> Meta+s

Holding Alt (Option) will also enable

Run selected -> Meta+Alt+r (also works holding Alt when clicking the Run button)
Will only run the code highlighted by the user.
If they accidentally only select whitespace (double-click on an empty line will do) it will run the whole script.

These other shortcuts require the use of Shift and are not of immediate need

Connect -> Meta+Shift+C
Disconnect -> Meta+Shift+D
Reset -> Meta+Shift+R

Clear Terminal -> Meta+k

Because of Reset, the default Electron shortcut for "Application Reload" is disabled, but the menu item still present and actionable under View > Reload

The default Electron shortcut for "Toggle Developer Tools" is disabled, but the menu item still present and actionable under View > Toggle Developer Tools

Connect and Disconnect work also in the File Manager view, while other shortcuts are disabled.

@ubidefeo ubidefeo changed the base branch from main to development December 10, 2024 16:06
@ubidefeo ubidefeo requested a review from sebromero December 11, 2024 15:53
@ubidefeo ubidefeo marked this pull request as ready for review December 11, 2024 15:53
Copy link
Collaborator

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments. I'd use all upper case for the shortcuts and maybe we should figure out how to do this without using global shortcuts.

Copy link
Collaborator

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of the code in index.js that is commented out and we're good to go.

@ubidefeo ubidefeo merged commit 2bd51bb into development Dec 13, 2024
1 check passed
@ubidefeo ubidefeo deleted the feature/shortcuts branch December 13, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants