Skip to content

fix(terminal): forward Ctrl+M as kitty CSI-u for Grok multiline toggle - #9932

Open
innocarpe wants to merge 1 commit into
stablyai:mainfrom
innocarpe:fix/grok-ctrl-m-multiline
Open

innocarpe wants to merge 1 commit into
stablyai:mainfrom
innocarpe:fix/grok-ctrl-m-multiline

Conversation

@innocarpe

Copy link
Copy Markdown
Contributor

🧑‍🤝‍🧑 Impact & ELI5

1) What's broken today (ELI5).
In Grok Build inside an Orca terminal, Ctrl+M is supposed to toggle multiline input. It does not work (behaves like Enter / does nothing useful). Users cannot switch multiline mode with the chord Grok documents.

2) What this PR does (ELI5).
Orca now sends Ctrl+M the same special way it already sends Ctrl+Enter: as a kitty CSI-u sequence that keeps Ctrl+M different from Enter. Grok can finally see the toggle chord.

3) Tradeoffs / regressions — honest answer.

Concern Assessment
Shell users who rely on Ctrl+M = Enter (CR) Ctrl+M will now send CSI-u \x1b[109;5u instead of bare CR. Enter still submits. Same design choice as Ctrl+Enter (#2418): prefer TUI disambiguation over historical control-char collapse.
Other TUIs that bind Ctrl+M via CSI-u Benefit.
Cmd+M on macOS Untouched (window minimize). Only Ctrl+M.
Platforms Same policy on macOS / Linux / Windows.

No settings, menus, or agent-config changes.


Summary

Bug: Grok Build Ctrl+M (toggle multiline) does not work in Orca’s terminal (#9736).

Root cause: In terminal encoding, Ctrl+M is historically CR (0x0d), the same byte as Enter. xterm.js collapses Ctrl+M to bare CR, so the TUI cannot distinguish “toggle multiline” from “submit”.

This is the same class of problem already fixed for Ctrl+Enter in terminal-shortcut-policy.ts (#2418):

// Ctrl+Enter → \x1b[13;5u  (Enter codepoint 13, Ctrl modifier 5)

Grok’s multiline toggle needs the analogous encoding for M:

// Ctrl+M → \x1b[109;5u  (codepoint 109 = 'm', Ctrl modifier 5)

Fix: In resolveTerminalShortcutAction, intercept plain Ctrl+M (key m/M or code KeyM) and sendInput the kitty CSI-u chord.

Fixes #9736


Evidence

Automated

pnpm exec vitest run --config config/vitest.config.ts \
  src/renderer/src/components/terminal-pane/terminal-shortcut-ctrl-m.test.ts \
  src/renderer/src/components/terminal-pane/terminal-shortcut-policy.test.ts

39/39 passed

File Asserts
terminal-shortcut-ctrl-m.test.ts (new) Ctrl+M / layout-Dead+KeyM → \x1b[109;5u; shift/meta/no-ctrl stay null
terminal-shortcut-policy.test.ts Existing suite still green (including Ctrl+Enter)

Why a separate test file: the main policy test file is already at the repo max-lines ratchet; AGENTS.md forbids max-lines disables.

Manual (expected after this PR)

  1. Open Grok Build in an Orca terminal (macOS).
  2. Focus the composer.
  3. Press Ctrl+M.
  4. Before: acts like Enter / no multiline toggle.
  5. After: multiline mode toggles as outside Orca.

Code map

Location Change
terminal-shortcut-policy.ts Ctrl+M → \x1b[109;5u
terminal-shortcut-ctrl-m.test.ts New focused regression tests

ELI5

Ctrl+M and Enter used to look identical to the terminal (both “carriage return”). Grok needs them to look different so Ctrl+M can mean “multiline,” not “send.” We label Ctrl+M with a special code, like we already did for Ctrl+Enter.


User-regression-tradeoffs

  • Intended: Ctrl+M reaches agent TUIs (Grok) as a distinct chord.
  • Shell Ctrl+M-as-Enter: may stop inserting CR; use Enter instead (same as Ctrl+Enter tradeoff).
  • Cmd+M (macOS): unchanged.

Checklist notes (CONTRIBUTING / AGENTS)

Area Notes
Cross-platform Uses ctrlKey (not meta). Cmd+M not remapped.
SSH / remote PTY input bytes; encoding independent of remote OS.
Agents Helps Grok multiline (and any TUI binding Ctrl+M via CSI-u). No agent-config change.
Git / providers N/A
Performance One extra predicate on the shortcut path.
UI No visual change.
Security No new IPC.
Tests Focused new file + full policy suite green. No max-lines disable.

Test plan

  • Unit: Ctrl+M → \x1b[109;5u
  • Unit: non-plain chords still passthrough
  • Full policy suite green
  • Optional live Grok smoke on macOS

Out of scope

  • Other historical Ctrl+letter collapses (Ctrl+J = LF, etc.) without a concrete TUI need
  • Changing Grok launch / kitty enablement

AI code-review summary

  1. Cross-platform — Ctrl not Cmd; OK
  2. SSH/remote — PTY bytes; OK
  3. Agents — encoding only
  4. Performance — trivial
  5. UI — N/A
  6. Security — N/A
  7. Correctness — mirrors proven Ctrl+Enter pattern; tests lock encoding; no max-lines disable

Made so Grok multiline works in Orca 🐋

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The terminal shortcut resolver now recognizes plain Ctrl+M, including events where the key value is remapped but the physical code is KeyM. It returns a kitty CSI-u sendInput action with the sequence \x1b[109;5u. Tests cover this behavior and verify that Ctrl+M with Shift or Meta, or without Ctrl, returns null.

Severity of issue fixed: Low

Merge Risk: Low · up to 3b5f1

Some keyboard layouts and Kitty-aware applications may receive incorrect chords or key events. These bounded issues warrant correction or owner acceptance before merge.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the main change: plain Ctrl+M is now forwarded as a kitty CSI-u sequence so Grok Build's multiline toggle can work. It follows the conventional commit format and matches the raw summar…
Description check Passed The description covers most required template sections. It has an ELI5, a what-changed explanation through the root cause and fix, a why with tradeoffs and alternatives, testing evidence with commands…
Linked Issues check Passed Issue #9736 requires Ctrl+M to work for Grok Build's multiline toggle in the Orca terminal. The reviewed head adds a branch in resolveTerminalShortcutAction (terminal-shortcut-policy.ts). The branch…
Out of Scope Changes check Passed The whole-PR code change is one new Ctrl+M branch in terminal-shortcut-policy.ts (+13 lines, confirmed by diff against the merge base). The supporting change is a focused test file for that branch. Bo…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Title check

Explanation

The title names the main change: plain Ctrl+M is now forwarded as a kitty CSI-u sequence so Grok Build's multiline toggle can work. It follows the conventional commit format and matches the raw summary and PR objectives. It is concise and specific.

Full details: Description check

Explanation

The description covers most required template sections. It has an ELI5, a what-changed explanation through the root cause and fix, a why with tradeoffs and alternatives, testing evidence with commands and a file table, and a risk and regression discussion. It links issue #9736 with 'Fixes #9736', though the template's 'Fixes #' line is filled in outside the template layout. Gaps: the Visual Proof section has no before/after video or screenshot, and the author describes the manual test as expected behavior rather than a performed test. The Risk section has no explicit 'Level' value (Low, Medium, or High), and the description does not say how to revert. The AI Disclosure, Agent skill upstream boundary, and Checklist items are not filled in or checked. The description is mostly complete, so the check passes, but the author should address these gaps.

Full details: Linked Issues check

Explanation

Issue #9736 requires Ctrl+M to work for Grok Build's multiline toggle in the Orca terminal. The reviewed head adds a branch in resolveTerminalShortcutAction (terminal-shortcut-policy.ts). The branch matches plain Ctrl+M (ctrlKey set; metaKey, altKey, and shiftKey unset; key is m or M, or code is KeyM). It returns sendInput with \x1b[109;5u, so Ctrl+M no longer reaches the TUI as bare CR. The diff confirms this code. The raw summary states that new tests cover the encoding and the non-plain chord cases, and the reported targeted run passed 39/39. The issue has no further acceptance criteria. Grok's handling of the CSI-u sequence is outside this repository. The live Grok smoke test is unchecked, so the end-to-end toggle behavior is not independently confirmed.

Full details: Out of Scope Changes check

Explanation

The whole-PR code change is one new Ctrl+M branch in terminal-shortcut-policy.ts (+13 lines, confirmed by diff against the merge base). The supporting change is a focused test file for that branch. Both directly implement #9736. The PR description also lists the documented tradeoff: shell users who relied on Ctrl+M as CR lose that behavior, and Enter still submits. This follows from the intended change and is not an unrelated change. Cmd+M and other Ctrl-letter mappings are not changed, and no settings, launch, or agent-config changes appear in the summary.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/renderer/src/components/terminal-pane/terminal-shortcut-ctrl-m.test.ts (1)

45-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover Alt+Ctrl+M and Cmd+M explicitly.

The resolver excludes altKey and must leave Cmd+M unchanged, but these cases are not asserted. Add both tests to prevent future regressions in the modifier boundary.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2b174d35-10e9-46b6-b487-171578b12d1d

📥 Commits

Reviewing files that changed from the base of the PR and between 39b124c and 51bc677.

📒 Files selected for processing (2)
  • src/renderer/src/components/terminal-pane/terminal-shortcut-ctrl-m.test.ts
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts

@innocarpe

Copy link
Copy Markdown
Contributor Author

Status ping: focused kitty CSI-u path so Grok Ctrl+M multiline works in the terminal (regression tests). No open threads if useful for a pass.

@innocarpe
innocarpe force-pushed the fix/grok-ctrl-m-multiline branch 2 times, most recently from 8105ac4 to 6e10b84 Compare October 22, 2026 00:33

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 62218441-4f9b-46b1-b5cb-076bd7b11769
📥 Commits

Reviewing files that changed from the base of the PR and between 51bc677 and 6e10b84.

📒 Files selected for processing: 1
  • src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Comment on lines +235 to +245
if (
event.ctrlKey &&
!event.metaKey &&
!event.altKey &&
!event.shiftKey &&
(event.key === 'm' || event.key === 'M' || event.code === 'KeyM')
) {
// Why: Ctrl+M is historically CR (same byte as Enter). xterm collapses it to
// bare CR, so Grok Build's multiline toggle never sees a distinct chord (#9736).
// Forward kitty CSI-u (codepoint 109 = 'm', modifier 5 = Ctrl) like Ctrl+Enter.
return { type: 'sendInput', data: '\x1b[109;5u' }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

set -eu
printf '%s\n' '--- policy and direct callers ---'
rg -n -F --glob '*.ts' -e 'resolveTerminalKeyboardShortcutAction' -e 'kitty' -e 'ConPTY' -e 'conpty' -e 'authority' -e 'sendInput' src/renderer/src/components/terminal-pane | sed -n '1,240p'
printf '%s\n' '--- policy complete relevant blocks ---'
nl -ba src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts | sed -n '1,280p'
printf '%s\n' '--- runtime and handler blocks ---'
nl -ba src/renderer/src/components/terminal-pane/terminal-keyboard-runtime.ts | sed -n '160,270p'
nl -ba src/renderer/src/components/terminal-pane/terminal-keyboard-event-handlers.ts | sed -n '190,320p'
printf '%s\n' '--- repository consumers/configuration for the sequence and Grok ---'
rg -n -F --glob '!node_modules/**' --glob '!dist/**' -e '\x1b[109;5u' -e '109;5u' -e 'CSI-u' -e 'multiline' -e 'Grok' -e 'terminalType' -e 'TERM_PROGRAM' . | sed -n '1,260p'

Repository: stablyai/orca

Length of output: 45518


🏁 Script executed:

set -eu
printf '%s\n' '--- policy inputs and branches ---'
nl -ba src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts | sed -n '1,270p'
printf '%s\n' '--- direct policy callers and mode state ---'
rg -n -F --glob '*.ts' -e 'resolveTerminalKeyboardShortcutAction' -e 'kitty' -e 'ConPTY' -e 'conpty' -e 'trusted' -e 'sendInput' src/renderer/src/components/terminal-pane | sed -n '1,220p'
printf '%s\n' '--- CSI-u and terminal consumer references ---'
rg -n -F --glob '!node_modules/**' --glob '!dist/**' -e '109;5u' -e 'CSI-u' -e 'kitty keyboard' -e 'multiline' -e 'Grok' . | sed -n '1,220p'

Repository: stablyai/orca

Length of output: 45656


🏁 Script executed:

set -eu
for f in src/renderer/src/components/terminal-pane/terminal-shortcut-policy.ts src/renderer/src/components/terminal-pane/terminal-keyboard-runtime.ts src/renderer/src/components/terminal-pane/terminal-keyboard-event-handlers.ts; do
  printf '%s\n' "--- $f ---"
  nl -ba "$f" | sed -n '1,360p'
done
printf '%s\n' '--- all exact policy field references ---'
rg -n -F --glob '*.ts' -e 'isWindowsConPty' -e 'kittyKeyboardProtocolActive' -e 'trustedCtrlEnterAuthority' -e 'resolveTerminalKeyboardShortcutAction' .

Repository: stablyai/orca

Length of output: 43052


🏁 Script executed:

set -eu
printf '%s\n' '--- keyboard protocol contract ---'
nl -ba src/renderer/src/lib/pane-manager/terminal-keyboard-protocol.ts | sed -n '1,190p'
printf '%s\n' '--- pane terminal options ---'
nl -ba src/renderer/src/lib/pane-manager/pane-terminal-options.ts | sed -n '1,130p'
printf '%s\n' '--- protocol tests ---'
nl -ba src/renderer/src/lib/pane-manager/terminal-keyboard-protocol.test.ts | sed -n '1,180p'
printf '%s\n' '--- dashboard terminal input counterpart ---'
nl -ba src/renderer/src/components/dashboard/dashboard-card-terminal-input.ts | sed -n '80,180p'
printf '%s\n' '--- focused protocol/shortcut references ---'
rg -n -F --glob '*.ts' -e 'terminalKeyboardProtocol' -e 'getTuiAgentPromptInjectionMode' -e 'CSI-u-blind' -e 'withhold' -e 'hasCtrlEnterCsiUAuthority' -e 'Ctrl+M' src/renderer/src src/shared | sed -n '1,220p'

Repository: stablyai/orca

Length of output: 36347


Gate Ctrl+M CSI-u on the active pane's keyboard capability.

Local Windows ConPTY panes withhold Kitty keyboard reporting from CSI-u-blind CLIs. Ctrl+Enter already sends \r unless Kitty flags or trusted consumer authority allow CSI-u, but Ctrl+M bypasses that policy. A non-Grok ConPTY shell can therefore receive \x1b[109;5u instead of carriage return and fail to process Ctrl+M.

Suggested fix
-  // Why: lazy so local ConPTY lookup runs only for Ctrl+Arrow and Ctrl+Enter.
+  // Why: lazy so local ConPTY lookup runs only for Ctrl+Arrow, Ctrl+Enter, and Ctrl+M.
  isLocalWindowsConptyPane?: () => boolean,
 
   if (
     event.ctrlKey &&
     !event.metaKey &&
     !event.altKey &&
     !event.shiftKey &&
     (event.key === 'm' || event.key === 'M' || event.code === 'KeyM')
   ) {
+    const localWindowsConpty = isLocalWindowsConptyPane?.() === true
+    const canSendCsiU =
+      !localWindowsConpty ||
+      (getKittyKeyboardFlagsActivePane?.() ?? 0) > 0 ||
+      hasCtrlEnterCsiUAuthority?.() === true
-    return { type: 'sendInput', data: '\x1b[109;5u' }
+    return { type: 'sendInput', data: canSendCsiU ? '\x1b[109;5u' : '\r' }
   }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (
event.ctrlKey &&
!event.metaKey &&
!event.altKey &&
!event.shiftKey &&
(event.key === 'm' || event.key === 'M' || event.code === 'KeyM')
) {
// Why: Ctrl+M is historically CR (same byte as Enter). xterm collapses it to
// bare CR, so Grok Build's multiline toggle never sees a distinct chord (#9736).
// Forward kitty CSI-u (codepoint 109 = 'm', modifier 5 = Ctrl) like Ctrl+Enter.
return { type: 'sendInput', data: '\x1b[109;5u' }
if (
event.ctrlKey &&
!event.metaKey &&
!event.altKey &&
!event.shiftKey &&
(event.key === 'm' || event.key === 'M' || event.code === 'KeyM')
) {
const localWindowsConpty = isLocalWindowsConptyPane?.() === true
const canSendCsiU =
!localWindowsConpty ||
(getKittyKeyboardFlagsActivePane?.() ?? 0) > 0 ||
hasCtrlEnterCsiUAuthority?.() === true
// Why: Ctrl+M is historically CR (same byte as Enter). xterm collapses it to
// bare CR, so Grok Build's multiline toggle never sees a distinct chord (#9736).
// Forward kitty CSI-u (codepoint 109 = 'm', modifier 5 = Ctrl) like Ctrl+Enter.
return { type: 'sendInput', data: canSendCsiU ? '\x1b[109;5u' : '\r' }

Ctrl+M is historically CR (same as Enter). xterm collapses it to bare CR, so
Grok Build never sees a distinct chord for multiline toggle. Emit kitty CSI-u
\\x1b[109;5u (modifier 5 = Ctrl), matching the existing Ctrl+Enter handling.

Fixes stablyai#9736
@innocarpe
innocarpe force-pushed the fix/grok-ctrl-m-multiline branch from 6e10b84 to 3b5f1de Compare November 8, 2026 11:40

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 555c8728-1af7-46cf-b1b3-23e2870251c2
Commits

Reviewing files that changed from the base of the PR and between 6e10b84 and 3b5f1de.

Files selected for processing: 1

  • src/renderer/src/components/terminal-pane/input/keyboard/terminal-shortcut-policy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

!event.metaKey &&
!event.altKey &&
!event.shiftKey &&
(event.key === 'm' || event.key === 'M' || event.code === 'KeyM')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Do not treat every KeyM as logical M.

On French AZERTY, KeyM is the comma key. Ctrl+comma therefore sends Ctrl+M and can trigger the wrong terminal action. (w3.org)

Use the physical-code fallback only when the logical key is unavailable.

// Why: Ctrl+M is historically CR (same byte as Enter). xterm collapses it to
// bare CR, so Grok Build's multiline toggle never sees a distinct chord (#9736).
// Forward kitty CSI-u (codepoint 109 = 'm', modifier 5 = Ctrl) like Ctrl+Enter.
return { type: 'sendInput', data: '\x1b[109;5u' }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Honor negotiated repeat reporting.

When the application enables Kitty event types, holding Ctrl+M sends every repeat as another press. Applications that distinguish presses from repeats can trigger the action repeatedly. (sw.kovidgoyal.net)

Encode repeats using the active flags, as terminal-kitty-csi-u-encoding.ts does.


Minor · Functional Correctness · Quick win

Supported by static analysis

Script executed:

rg -n 'keyup|release|pressed|Dead|KeyM|Kitty' src/renderer/src/components/terminal-pane/input/keyboard

Repository: stablyai/orca

Length of output: 24055


Script executed:

p=src/renderer/src/components/terminal-pane
for f in input/keyboard/terminal-shortcut-policy.ts input/keyboard/terminal-keyboard-event-handlers.ts input/keyboard/terminal-keyboard-release-handlers.ts input/keyboard/terminal-kitty-orphan-keyup-guard.ts input/keyboard/terminal-kitty-csi-u-encoding.ts terminal-shortcut-ctrl-m.test.ts; do
 echo "===== $p/$f"
 nl -ba "$p/$f" | sed -n '1,340p'
done
echo "===== guard usage"
rg -n -F -e 'createTerminalKittyOrphanKeyupGuard' -e 'kittyOrphanKeyupGuard' -e 'terminalKittyOrphanKeyupGuard' -e 'orphanKeyupGuard' -- "$p" src || test "$?" -eq 1
echo "===== xterm dependencies and kitty implementations"
rg -n -i -e 'kitty.*(keydown|keyup|pressed)' -e '(keydown|keyup|pressed).*kitty' -e 'xterm.*kitty' -- "$p" packages src/renderer/src 2>/dev/null | sed -n '1,180p'
echo "===== diff"
git diff 4824562f3e0dadd343772dd98b16a3b3adaa1394 3b5f1de67063f2824662779e67685e24ee0a0278 -- "$p/input/keyboard/terminal-shortcut-policy.ts" "$p/terminal-shortcut-ctrl-m.test.ts"

Repository: stablyai/orca

Length of output: 42308


Script executed:

p=src/renderer/src/components/terminal-pane/input
for spec in 'keyboard/terminal-keyboard-event-handlers.ts:112:300' 'keyboard/terminal-keyboard-release-handlers.ts:1:160' 'keyboard/terminal-kitty-orphan-keyup-guard.ts:1:80' 'terminal-pane-pane-input.ts:75:205' 'keyboard/terminal-keyboard-hook.ts:115:152' 'keyboard/terminal-option-kitty-release.ts:1:112' 'keyboard/terminal-kitty-csi-u-encoding.ts:65:160'; do
 f=${spec%%:*}; r=${spec#*:}; a=${r%%:*}; b=${r##*:}
 echo "===== $p/$f"
 nl -ba "$p/$f" | sed -n "${a},${b}p"
done

Repository: stablyai/orca

Length of output: 31339


Script executed:

p=src/renderer/src/components/terminal-pane
rg -n -F -e 'function isEditableTarget' -e 'KITTY_REPORT_EVENT_TYPES' -e 'report event types' -e 'release event' -- "$p/input/keyboard" src/shared/terminal/protocol/input-modes | sed -n '1,150p'
nl -ba "$p/input/keyboard/terminal-keyboard-shortcut-matching.ts" | sed -n '1,105p'
nl -ba src/shared/terminal/protocol/input-modes/terminal-kitty-keyboard-flags.ts
nl -ba "$p/input/paste/terminal-captured-input-dispatch.ts" | sed -n '1,100p'

Repository: stablyai/orca

Length of output: 8522


Send a matching release for the captured Ctrl+M press.

When Kitty event-type reporting is enabled, the captured press does not reach xterm, so the keyup guard can suppress its release. Applications that track pressed keys receive an M press without a matching release and cannot clear that key’s pressed state.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Grok Build Ctrl+M (toggle multiline) not working in Orca terminal

3 participants