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 doesn't kill running process #3248

Closed
jsjoeio opened this issue Mar 9, 2021 · 5 comments
Closed

iPadOS: Ctrl + C doesn't kill running process #3248

jsjoeio opened this issue Mar 9, 2021 · 5 comments

Comments

@jsjoeio
Copy link

jsjoeio commented Mar 9, 2021

ctrl + c keyboard shortcut/combination does not kill running process on iPad.

Details

  • Browser and browser version: Chrome 87.0.4280.77
  • OS version: iPadOS 14.5 (18E5164h)
  • xterm.js version: 4.10.0

Steps to reproduce

  1. Start demo in xterm.js with yarn start
  2. Expose port (to access from iPad) with ngrok: ngrok http 3000
  3. Open ngrok URL on iPad
  4. Start a running process i.e. npm start on a create-react-app
  5. After it starts and is running, try to kill process with ctrl + c on iPad

Expected

Keyboard shortcut kills process.

Actual

Enters new line. See recording:

RPReplay_Final1615247724.MP4

Related

@Tyriar
Copy link
Member

Tyriar commented Mar 9, 2021

We just worked around this in vscode, it's not the best fix because there's some bug in xterm.js causing this to happen, we just don't have an iPad to get to the bottom of it.

@jsjoeio
Copy link
Author

jsjoeio commented Mar 9, 2021

@Tyriar I'm not super familiar with the xterm.js codebase, but I do have an iPad and motivation to help. I'd be happy to pitch in with some guidance!

@springhack
Copy link

I found this problem recently, it just because safari iOS report keyCode 13 while pressing ctrl-c;
I search MDN then I found the property keyCode is deprecated, so it's not a bug for safari, it's a bug for xterm.js and code-server;

I suggest just use property key but keyCode of KeyboardEvent, then resolve this problem.

MDN Link: https://developer.mozilla.org/zh-CN/docs/Web/API/KeyboardEvent/keyCode

@Tyriar
Copy link
Member

Tyriar commented Mar 11, 2021

@springhack seems like a bug in Safari as well if it's returning the key code for enter, but regardless moving to ctrlKey/altKey/shiftKey seems like the right thing to do.

@Tyriar Tyriar added this to the 4.12.0 milestone Mar 11, 2021
@Tyriar Tyriar added the type/bug Something is misbehaving label Mar 11, 2021
@Tyriar Tyriar modified the milestones: 4.12.0, 4.13.0 May 10, 2021
@Tyriar Tyriar modified the milestones: 4.13.0, 4.14.0 Jun 24, 2021
@Tyriar Tyriar removed this from the 4.14.0 milestone Sep 1, 2021
@Tyriar
Copy link
Member

Tyriar commented Oct 19, 2021

Closing in favor of #1862 as that's about removing the keyCode usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants