Add Ctrl+Enter / Cmd+Enter shortcut to Input TextArea - #8
Merged
Conversation
Closed
Agent-Logs-Url: https://github.com/N-ha-1050/python-code-editor/sessions/440750d5-af6e-481c-ab8e-b92b29e9825e Co-authored-by: N-ha-1050 <69199126+N-ha-1050@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add shortcut functionality for Input TextArea
Add Ctrl+Enter shortcut to Input TextArea
May 3, 2026
N-ha-1050
reviewed
May 3, 2026
Agent-Logs-Url: https://github.com/N-ha-1050/python-code-editor/sessions/bdbdbc8c-78b6-4760-8371-cdf95b1a6914 Co-authored-by: N-ha-1050 <69199126+N-ha-1050@users.noreply.github.com>
N-ha-1050
requested changes
May 3, 2026
N-ha-1050
left a comment
Owner
There was a problem hiding this comment.
Wrokflow の code quality のチェックが失敗している内容は見ることができますか?見られるなら修正してください。見られない場合は言ってもらえればログを送ります。
Agent-Logs-Url: https://github.com/N-ha-1050/python-code-editor/sessions/1fdb80a6-6b15-4ac8-849a-8ee4a4f63286 Co-authored-by: N-ha-1050 <69199126+N-ha-1050@users.noreply.github.com>
Contributor
Author
ログを確認できました。Biome のフォーマットチェックが失敗しており、 import {
formatButton,
inputTextArea,
isButton,
isTextArea,
runButton,
} from "./elements" |
N-ha-1050
approved these changes
May 3, 2026
N-ha-1050
approved these changes
May 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a keyboard shortcut so users can execute code directly from the input textarea, aligning that part of the UI more closely with the rest of the editor workflow.
Changes:
- Import the input textarea element and its type guard into
src/main.ts - Validate that the input element exists and is a textarea before wiring events
- Add a
keydownhandler that triggersrun()whenCtrl+Enteris pressed in the input textarea
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
N-ha-1050
requested changes
May 3, 2026
Agent-Logs-Url: https://github.com/N-ha-1050/python-code-editor/sessions/962866e2-0cad-476b-86f6-653d6423fe45 Co-authored-by: N-ha-1050 <69199126+N-ha-1050@users.noreply.github.com>
Copilot
AI
changed the title
Add Ctrl+Enter shortcut to Input TextArea
Add Ctrl+Enter / Cmd+Enter shortcut to Input TextArea
May 3, 2026
N-ha-1050
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Input TextArea had no keyboard shortcut to trigger code execution, requiring users to click the Run button or focus the editor to use existing shortcuts.
Changes
src/main.ts: AddedinputTextArea/isTextAreato imports from./elements, added the corresponding existence check, and attached akeydownlistener that callsrun()onCtrl+Enter(Windows/Linux) orCmd+Enter(macOS)