Commit 88daab3
authored
🤖 Fix Ctrl+A and Ctrl+C interception in text inputs (#355)
## Problem
Ctrl+A (select all) and Ctrl+C (copy) were broken in text inputs because
the keybinds were being intercepted globally, even when the user was
typing.
## Solution
Only intercept these keybinds when actively needed:
- **Ctrl+A (ACCEPT_EARLY_COMPACTION)**: Only intercept during active
compaction, otherwise allow browser's select-all behavior
- **Ctrl+C (INTERRUPT_STREAM)**: Only intercept during compaction or
when not in an editable element, otherwise allow browser's copy behavior
## Testing
1. Open cmux in browser (server mode)
2. Type text in the chat input
3. Press Ctrl+A - should select all text
4. Press Ctrl+C - should copy selected text
5. During active compaction, both keybinds should still trigger their
compaction-related actions
_Generated with `cmux`_1 parent 91d4804 commit 88daab3
1 file changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | | - | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
73 | 76 | | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| 84 | + | |
79 | 85 | | |
80 | | - | |
81 | | - | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| 93 | + | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
| |||
0 commit comments