Add Shift+Tab key to mobile QuickKeyboard (#111)

* Add Shift+Tab key to mobile QuickKeyboard per PR #105 feedback

Implements Peter's suggestion to add Shift+Tab key to mobile quick keyboard
for enhanced Claude Code planning mode support on mobile devices.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Monaco Editor keyboard input cancellation

Enhanced isKeyboardShortcut detection to properly handle Monaco Editor
elements, preventing keyboard event interference while maintaining
terminal functionality.

- Added contentEditable detection
- Added .monaco-editor container detection
- Added data-keybinding-context detection
- Added .editor-container detection

This resolves the 'Canceled: Canceled' errors when typing in Monaco Editor
while preserving Shift+Tab functionality for Claude Code planning mode.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Helmut Januschka 2025-06-27 21:32:06 +02:00 committed by GitHub
parent 4788afb7ed
commit b98a8d190e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -257,14 +257,18 @@ export class InputManager {
}
isKeyboardShortcut(e: KeyboardEvent): boolean {
// Check if we're typing in an input field
// Check if we're typing in an input field or editor
const target = e.target as HTMLElement;
if (
target.tagName === 'INPUT' ||
target.tagName === 'TEXTAREA' ||
target.tagName === 'SELECT'
target.tagName === 'SELECT' ||
target.contentEditable === 'true' ||
target.closest('.monaco-editor') ||
target.closest('[data-keybinding-context]') ||
target.closest('.editor-container')
) {
// Allow normal input in form fields
// Allow normal input in form fields and editors
return false;
}

View file

@ -9,6 +9,7 @@ const TERMINAL_QUICK_KEYS = [
{ key: 'CtrlExpand', label: '⌃', toggle: true, row: 1 },
{ key: 'F', label: 'F', toggle: true, row: 1 },
{ key: 'Tab', label: 'Tab', row: 1 },
{ key: 'shift_tab', label: '⇤', row: 1 },
{ key: 'ArrowUp', label: '↑', arrow: true, row: 1 },
{ key: 'ArrowDown', label: '↓', arrow: true, row: 1 },
{ key: 'ArrowLeft', label: '←', arrow: true, row: 1 },