How to stop input inside iex

You can use Ctrl + G to enter Job control mode, there you can interrupt the running job (e.g. with i 1) and connect to it back.

iex(5)>  IO.read :all
1111

User switch command
 --> j
   1* {erlang,apply,[#Fun<Elixir.IEx.CLI.1.121285560>,[]]}
 --> i 1
 --> c 1
{:error, :interrupted}
iex(6)>