-
Notifications
You must be signed in to change notification settings - Fork 306
Add Esc/Del and Ctrl/Alt modifier support to terminal toolbar #1300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Esc and Ctrl key buttons to the terminal keyboard toolbar, enhancing terminal control capabilities on mobile devices. The Ctrl key features a toggle state with visual feedback and automatically resets after key presses.
Changes:
- Added Esc button to send escape character to terminal
- Added Ctrl button with toggle behavior and visual state
- Implemented control character encoding (Ctrl+key combinations)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Dependencies/terminal.bundle/index.html | Added JavaScript functions for control state management and control character encoding |
| CodeApp/Views/TerminalKeyboardToolbar.swift | Added UI buttons for Esc and Ctrl keys with state management and notification handling |
| CodeApp/Managers/TerminalInstance.swift | Added Swift methods to sync control state with JavaScript and handle control reset events |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bb5d156 to
72b4b0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Introduces Escape, Delete, and Control and Alt modifier buttons to the terminal keyboard toolbar, allowing users to send modified key sequences. Updates the Swift and JavaScript code to track modifier state, apply modifiers to terminal input, and synchronize state between the UI and the terminal. Modifier states are reset after use, and notifications are used to keep the UI in sync.
1a388b8 to
10bd8c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added a check to exclude ESC[200~ and ESC[201~ keycodes from being modified, preserving the integrity of the bracketed paste protocol in the terminal.
|
Thank you! I will review the changes in a bit |
Please let me know if you think it needs changes. |
Summary
Changes
Terminal keyboard toolbar (TerminalKeyboardToolbar.swift):
Terminal JavaScript (terminal.bundle/index.html):
Terminal instance (TerminalInstance.swift):