[PR #4108] [MERGED] fix: ctrl+enter inserting newline in code #4668

Closed
opened 2026-03-17 02:11:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4108
Author: @ajmalmohad
Created: 6/5/2024
Status: Merged
Merged: 7/2/2024
Merged by: @nivedin

Base: patchHead: fix/run-keybind-codemirror


📝 Commits (2)

  • c1dc894 fix: ctrl+enter inserting newline in code
  • 88b56f4 chore: add 'cmd+enter' to the key list

📊 Changes

1 file changed (+10 additions, -0 deletions)

View changed files

📝 packages/hoppscotch-common/src/composables/codemirror.ts (+10 -0)

📄 Description

Closes #4029, #3788, #4164

Description

Ctrl+Enter is a keybind for running requests. But using that from codemirror can create a new line along with running the request, so I've overridden the default behaviour of codemirror. Precedence highest is used to override the default ones

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

screen-capture (1) (1).webm


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4108 **Author:** [@ajmalmohad](https://github.com/ajmalmohad) **Created:** 6/5/2024 **Status:** ✅ Merged **Merged:** 7/2/2024 **Merged by:** [@nivedin](https://github.com/nivedin) **Base:** `patch` ← **Head:** `fix/run-keybind-codemirror` --- ### 📝 Commits (2) - [`c1dc894`](https://github.com/hoppscotch/hoppscotch/commit/c1dc894b5f13c31d1d776a0825b93976dc627c96) fix: ctrl+enter inserting newline in code - [`88b56f4`](https://github.com/hoppscotch/hoppscotch/commit/88b56f46a5b9cb3628843911861efe36aac54455) chore: add 'cmd+enter' to the key list ### 📊 Changes **1 file changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+10 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes #4029, #3788, #4164 ### Description Ctrl+Enter is a keybind for running requests. But using that from codemirror can create a new line along with running the request, so I've overridden the default behaviour of codemirror. Precedence highest is used to override the default ones <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed ### Additional Information <!-- Any additional information like breaking changes, dependencies added, screenshots, comparisons between new and old behaviour, etc. --> [screen-capture (1) (1).webm](https://github.com/hoppscotch/hoppscotch/assets/55492635/f391eedc-0fde-4609-8ddc-1d62cabb64da) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:11:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4668
No description provided.