You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Suggestion]: Keyboard navigation for Run and Clear #11
I have to move my hands from the keyboard, grab the mouse, and click the Run and Clear buttons.
Afterwards I have to click the text area to continue editing.
Consider adding a keyboard shortcut such as Control + Return for launching Run and showing the keyboard shortcut as a tooltip.
Consider moving the keyboard focus back to text area after launching Run and Clear.
It's a bit difficult to find bindings that are relatively obvious and free.
I suggest Ctrl+Enter for "Run" and Ctrl+Backspace for "Clear", ⌘+Enter & ⌘+Backspace on Mac.
Ctrl+Enter for "Run" is great but Ctrl+Backspace is already taken for "delete word before cursor" (in most text editors and browsers). You could use Ctrl+Shift+Backspace for that.
+1 to command+return on Mac for running -- makes sense and is consistent with other behaviour (like sending this comment). I think sending the focus to the code window after run makes sense.
It's fine If we don't settle on clear for now as cmd+a then delete is a native way to clear the window without having to map anything and it keeps the focus.
I am unsure whether an option to clear the console together with the output is really necessary. After all, the console is cleared anyways when re-running the code.
Activity
delabassee commentedon Oct 9, 2023
It's a bit difficult to find bindings that are relatively obvious and free.
I suggest Ctrl+Enter for "Run" and Ctrl+Backspace for "Clear", ⌘+Enter & ⌘+Backspace on Mac.
nipafx commentedon Oct 9, 2023
Ctrl+Enterfor "Run" is great butCtrl+Backspaceis already taken for "delete word before cursor" (in most text editors and browsers). You could useCtrl+Shift+Backspacefor that.delabassee commentedon Oct 9, 2023
Not a big fan of a 3 keys combo. What about Ctrl+Esc instead?
danthe1st commentedon Oct 9, 2023
Ctrl+Escis at least used by Windows for bringing up the start menu.carimura commentedon Oct 9, 2023
+1 to
command+returnon Mac for running -- makes sense and is consistent with other behaviour (like sending this comment). I think sending the focus to the code window after run makes sense.It's fine If we don't settle on clear for now as
cmd+athendeleteis a native way to clear the window without having to map anything and it keeps the focus.delabassee commentedon Oct 9, 2023
Note that "clear" clears both the editor and the console.
tofflos commentedon Oct 9, 2023
I'd be super happy with just the Run shortcut and I'm not sure I would use a Clear shortcut often enough to warrant a shortcut.
delabassee commentedon Oct 10, 2023
Isn't Esc a good "Clear" (console & editor) shortcut?
nipafx commentedon Oct 13, 2023
Ctrl+Shift+Backspaceis not uncommon for larger deletes, e.g. in GitHub comment fields it deletes a line.Only if a popup asks whether you really want to do that. Otherwise
Escis too commonly used to have such destructive effects.danthe1st commentedon Oct 13, 2023
I am unsure whether an option to clear the console together with the output is really necessary. After all, the console is cleared anyways when re-running the code.