Ctrl-c not working in IOS with external keyboard

Problem description:

Using IOS (ipad) and any external keyboard, you can not send CTRL-C in the shell. If you type ctrl-c, the shell will receive ctrl-M. (Return)

Expected behavior:

If I type ctrl-c i’d like the shell to receive ctrl-C!

Actual behavior:

It receives ctrl-M, as if I typed return.

Steps to reproduce:

Get an ipad, attach a keyboard (any keyboard). Open a new repl, open a shell. Start any program that can be interrupted by ctrl -c: e.g.

$ cat

Now type ctrl-c

The shell will act as if you hit the return key.

NOTE to prove this is actually being translated to ‘ctrl-M’, instead of cat you can do:

$ showkey -a

This will show that when you type ctrl-C a ctrl-M is received.

NOTE: I posted a question first in replit help section but nobody helped.

NOTE : the actual translation appears to be done maybe by webkit. You can see this from the following similar problem that is found in vscode: Control-C not recognized from iPadOS · Issue #1343 · coder/code-server · GitHub. They were able to address it by adding a configuration in VSCODE. Perhaps you can do the same?

Bug appears at this link:

Browser: Safari or mobile app
OS: IOS ipados 17
Device (Android, iOS, NA leave blank): ipad
Desktop app version (Avatar menu->“Version”) or NA: NA
Plan (Free, Replit Core): core

1 Like

I got some extra info right here
so I have experienced the same thing on my another repl when I need to stop my code, ctrl C doesn’t work
from the screenshot I took, the key code for ctrl+C is not ^C but a newline, somehow

details about my issue, I think they're kinda related

Can I keyboard interrupt without a keyboard? (Kinda emergent)

by the way, for your information, other escape keys such as ctrl Z, del, shift del and ctrl x doesn’t work as well

1 Like

Thank you. This seems similar but in my case Ctrl-z does work. Ctrl-C doesn’t.

If you are trying to copy text from the shell? Use Shift + Ctrl + c instead of just ctrl + c

1 Like

You could try CTRL \ or CTRL Z.

@fariesofeast — thanks, but:
Ctrl \ sends 0x1c
Ctrl-Z sends Ctrl-Z — but it is not the same effect as Ctrl c. Different functions (e.g interrupting the erlang shell (requires an actual ctrl-c) vs interrupting something else (e.g. python). Ctrl-z is useful if you want to background and kill a task, which is not always what I want when I use Ctrl C.

@vvithershins — Thanks but I am not trying to copy and paste.

1 Like

I’ll flag this for the mobile team. You can use our actions menu for copy and paste in the app, just make sure you’re updated to the latest version.

Edit: just saw @TaokyleYT 's post:

banned me from installing app, including replit

This might be a blocker.

Thanks Jesse. Just to be clear this is about sending ctrl-c to the shell in Replit mobile on iOS, and on Replit web on iOS. It is not specifically about installing anything so not sure where your quote came from. But fixing it will have a clearly positive impact on the usability of Replit on iOS.