Skip to content
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

iPadOS: Ctrl + C in terminal doesn’t kill running process #114009

Closed
jsjoeio opened this issue Jan 7, 2021 · 7 comments · Fixed by #118243, #118247 or #119979
Closed

iPadOS: Ctrl + C in terminal doesn’t kill running process #114009

jsjoeio opened this issue Jan 7, 2021 · 7 comments · Fixed by #118243, #118247 or #119979
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release terminal Integrated terminal issues verified Verification succeeded
Milestone

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 7, 2021

Description

Hitting ctrl + c with the terminal focused and a process running (i.e. yarn start in a React app) does not kill the process.

If someone is able to provide a good starting point, I would be willing to take a stab at this.

  • VSCode Version: 1.53.0-insider
  • OS Version: iPadOS 14.1 (18A8395)
  • Commit: 01089c0
  • Date: 2021-01-07T05:25:51.740Z (16 hrs ago)
  • Browser: Mozilla/5.0 (iPad; CPU OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1

Steps to Reproduce:

  1. On iPad, open Codespaces environment in Chrome
  2. Open integrated Terminal
  3. Start application (i.e. like a create-react-app - yarn start)
  4. Focus terminal and hit ctrl + c

Expected

Process (yarn start) should stop running

Actual

Terminal receives new line

IMG_0009.MP4

Does this issue occur when all extensions are disabled?: Yes

Related:

@luca400
Copy link

luca400 commented Jan 8, 2021

Perhaps that is not the right sigint.

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 8, 2021

One other piece of insight: this may not be limited to VSCode. @cdr has a product which includes a terminal in the browser. I’m able to reproduce the same issue (see line breaks at the bottom).

9949BCB2-5A05-442E-987A-A2DF4D297061

@jsjoeio
Copy link
Contributor Author

jsjoeio commented Jan 8, 2021

As a temporary workaround, it works if you manually define the shortcut like so:

  1. Open Command Palette
  2. Look for "Preferences: Open Keyboard Shortcuts (JSON)"
  3. Add this:
{
    "key": "ctrl+c",
    "command": "workbench.action.terminal.sendSequence",
    "args": {
      "text": "\u0003"
    },
    "when": "terminalFocus"
}

Source: StackOverflow

@meganrogge meganrogge added bug Issue identified by VS Code Team member as probable bug terminal Integrated terminal issues labels Jan 11, 2021
@meganrogge meganrogge added this to the Backlog milestone Jan 11, 2021
@meganrogge meganrogge modified the milestones: Backlog, March 2021 Mar 4, 2021
meganrogge added a commit that referenced this issue Mar 4, 2021
meganrogge added a commit that referenced this issue Mar 5, 2021
meganrogge added a commit that referenced this issue Mar 5, 2021
This reverts commit f916e9f.
meganrogge added a commit that referenced this issue Mar 5, 2021
meganrogge added a commit that referenced this issue Mar 5, 2021
meganrogge added a commit that referenced this issue Mar 5, 2021
@springhack
Copy link

I found the root reason was iPad Safari report keyCode of ctrl-c as 13, which is not correct, reference from MDN, keyCode is a deprecated property;

The key and code property is right, so I suggest just use key property, not keyCode, on the whole html page not just terminal.

@rebornix
Copy link
Member

@meganrogge I'm still seeing this in codespace, am I testing the right environment?

@rebornix rebornix added the verification-found Issue verification failed label Mar 26, 2021
@rebornix rebornix reopened this Mar 26, 2021
@TylerLeonhardt TylerLeonhardt added the candidate Issue identified as probable candidate for fixing in the next release label Mar 26, 2021
@meganrogge
Copy link
Contributor

fixed w cc077af

@rzhao271 rzhao271 removed the verification-found Issue verification failed label Mar 29, 2021
@rebornix rebornix added the verified Verification succeeded label Mar 29, 2021
@lxjwlt
Copy link

lxjwlt commented Apr 22, 2021

as another workaround, use ctrl+\ shortcut instead of ctrl+c, it will interrupt the process as well

@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release terminal Integrated terminal issues verified Verification succeeded
Projects
None yet
9 participants