vercel / vercel/hyper

[bug] Ctrl+Enter sends ASCII 13 \r instead of ASCII 10 \n

Open
#7,844 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate
  • OS version and name:
    • OS Name: Microsoft Windows 11 Pro
    • Version: 10.0.22621 Build 22621
  • WSL 2:
    • Debian: Debian GNU/Linux 11 (bullseye)
    • WSL version: 2.1.5.0
    • Kernel version: 5.15.146.1-2
  • Hyper.app version: 3.4.1 (stable)
  • Link of a Gist with the contents of your hyper.json: reproducible on Is Vanilla
  • Relevant information from devtools: N/A
  • The issue is reproducible in vanilla Hyper.app: Is Vanilla

Issue

=== Issue ===
ctrl + enter does not work correctly in Hyper.

=== Expectation ===
When using a Linux bash shell, it's typical for the terminal emulator to return different codes for enter and ctrl + enter:

  • enter: expected to return ASCII code 13 \r
  • ctrl + enter: expected to return ASCII code 10 \n
  • ctrl + j: expected to return ASCII code 10 \n

=== Example ===

Screenshot 2024-03-17 171213

=== Impact ===
Many modern apps and webapps use enter within text editors, but have a dedicated hotkey for ctrl+enter to submit.

Many other terminals can distinguish between enter and ctrl+enter out of the box.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Hyper's keyboard handling and terminal input path for Ctrl+Enter on Windows, comparing it with Enter and Ctrl+J. Reproduce the issue in the vanilla Hyper.app configuration and verify that Ctrl+Enter emits ASCII 10 while Enter continues to emit ASCII 13.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.