Problem Description
Currently, running tests requires manually moving the cursor and clicking the "Run tests" button with the mouse (web/interview.js:517):
nodes.run.addEventListener("click", runTests);
In mainstream competitive programming and interview platforms (e.g., LeetCode, HackerRank), candidates heavily rely on Ctrl+Enter (Windows/Linux) or Cmd+Enter (macOS) to run tests without taking their hands off the keyboard.
Furthermore, as noted in #131, the "Run tests" button can sometimes wrap or become awkward to click on narrower viewport widths. Having a standard keyboard shortcut significantly reduces interaction friction during timed interviews.
Proposed Changes
In web/interview.js, update the editor's keydown listener (line 581):
nodes.editor.addEventListener("keydown", (event) => {
// Trigger Run tests with Ctrl+Enter or Cmd+Enter
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
event.preventDefault();
if (!nodes.run.disabled) {
runTests();
}
return;
}
// existing Tab/Escape handling...
});
Update the button tooltip/title attribute in web/interview.html (line 171):
<button id="run-tests" class="run-button" type="button" title="Run tests (Ctrl+Enter / ⌘Enter)">
Run tests
</button>
Expected Value
Matches mainstream interview and competitive programming editor ergonomics.
Allows candidates to focus on problem-solving without frequent context switching between keyboard and mouse.
Problem Description
Currently, running tests requires manually moving the cursor and clicking the "Run tests" button with the mouse (
web/interview.js:517):In mainstream competitive programming and interview platforms (e.g., LeetCode, HackerRank), candidates heavily rely on Ctrl+Enter (Windows/Linux) or Cmd+Enter (macOS) to run tests without taking their hands off the keyboard.
Furthermore, as noted in #131, the "Run tests" button can sometimes wrap or become awkward to click on narrower viewport widths. Having a standard keyboard shortcut significantly reduces interaction friction during timed interviews.
Proposed Changes
In web/interview.js, update the editor's keydown listener (line 581):
Update the button tooltip/title attribute in web/interview.html (line 171):
Expected Value
Matches mainstream interview and competitive programming editor ergonomics.
Allows candidates to focus on problem-solving without frequent context switching between keyboard and mouse.