Skip to content

fix: hotkey issues (@miodec)#7802

Merged
Miodec merged 3 commits intomasterfrom
hotkeys
Apr 9, 2026
Merged

fix: hotkey issues (@miodec)#7802
Miodec merged 3 commits intomasterfrom
hotkeys

Conversation

@Miodec
Copy link
Copy Markdown
Member

@Miodec Miodec commented Apr 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 9, 2026 18:56
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Apr 9, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts frontend hotkey resolution to avoid conflicts between “quick restart” / “commandline” and test content (tabs/newlines), by dynamically shifting certain hotkeys on the test page.

Changes:

  • Shift quickRestart only when its configured key conflicts with test content (tabs/newlines) or in long tests.
  • Shift commandline to Shift+Tab when it would otherwise block typing literal tabs.
  • Refactor conditions into named booleans for readability.

isOnTestPage && (wordsHaveTab() || isLongTest()),
isOnTestPage &&
((wordsHaveTab() && quickRestartIsTab) ||
(wordsHaveNewline() && quickRestartIsEnter) ||
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

quickRestart=enter is shifted only when wordsHaveNewline(), but funbox "58008" uses Enter for input (see funbox-functions getEmulatedChar) and modes-notice already treats it like newline. Missing this here means Enter can still trigger quick restart while user is typing in that funbox; include getConfig.funbox.includes("58008") in the shift condition for quickRestart when quickRestartIsEnter.

Suggested change
(wordsHaveNewline() && quickRestartIsEnter) ||
((wordsHaveNewline() || getConfig.funbox.includes("58008")) &&
quickRestartIsEnter) ||

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +37
// const quickRestartIsEsc = getConfig.quickRestart === "esc";

const commandlineIsTab = getConfig.quickRestart === "esc";
// const commandlineIsEsc = getConfig.quickRestart !== "esc";
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

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

Remove the commented-out boolean helpers (quickRestartIsEsc/commandlineIsEsc) or use them; leaving commented code in this hotkey logic makes future edits/error-prone (esp since these flags are central to keybinding conflicts).

Suggested change
// const quickRestartIsEsc = getConfig.quickRestart === "esc";
const commandlineIsTab = getConfig.quickRestart === "esc";
// const commandlineIsEsc = getConfig.quickRestart !== "esc";
const commandlineIsTab = getConfig.quickRestart === "esc";

Copilot uses AI. Check for mistakes.
@Miodec Miodec merged commit de19ff9 into master Apr 9, 2026
15 checks passed
@Miodec Miodec deleted the hotkeys branch April 9, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants