Skip to content

feat(editor): add keyboard shortcut for Run Code button#8268

Open
enkr1 wants to merge 1 commit intoCoursemology:masterfrom
enkr1:feat/run-code-hotkey
Open

feat(editor): add keyboard shortcut for Run Code button#8268
enkr1 wants to merge 1 commit intoCoursemology:masterfrom
enkr1:feat/run-code-hotkey

Conversation

@enkr1
Copy link

@enkr1 enkr1 commented Mar 21, 2026

Closes #4972

Changes

RunCodeButton.tsx:

  • Add Ctrl+Shift+Enter / Cmd+Shift+Enter keyboard shortcut (mirrors SubmitButton pattern using react-hot-keys)
  • Add tooltip showing the shortcut on hover
  • Extract isDisabled to avoid duplicating the condition

translations.ts:

  • Add runCodeTooltip translation

Why Ctrl+Shift+Enter?

Ctrl+Enter is already used by Submit. Shift modifier keeps it distinct while staying intuitive — same pattern used in VS Code for "Run" vs "Run Selection".

Not changed

Submit button's existing Ctrl+Enter shortcut is untouched.

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.

Missing "run code" hotkey for manual graded programming questions

1 participant