How to enter EOF (Ctrl+z) in Run console?
I am working through some example programs which require the user to enter simple text data at the console, simulating what might come from a file.
This calls for the user to end by entering Ctrl+z in order to send EOF.
If I run such a program at the Windows command line, it works as expected.
However, if I run it in IDEA, it seems that the Ctrl+z is being trapped by the Run console or IDE, and not conveyed to the program.
I tried using the IDE key mapping settings (for Main Menu) to unmap Ctrl+z from its normal "undo" function. That indeed stopped Ctrl+z from performing Undo, but did not cause the console to pass Ctrl+z through to the program.
Any ideas how to get the Run console to pass Ctrl+z to the running program?
I am using IDEA 11.1.1 on Windows 7 with "JDK7u4" though IDEA help reports JDK 1.6.0_31.
Thanks,
-- Graham
请先登录再写评论。
Hi Graham,
It's not possible to do that at the moment
Denis
OK, thanks. Disappointing, but better to know than to wonder if I've missed something!
-- Graham
I have the same exact problem on a mac.
<Ctrl>+d is not giving EOF indicator when pressed in the console/run window.
http://youtrack.jetbrains.com/issue/IDEA-12514
The hotkey is Ctrl+D as stated in the fixed issue above
Ctrl+D I have resolved the problem.
Thanks!
For Mac users, the shortcut is <command>+D
sure you can do this ctrl+z
open ubuntu Terminal windows
run
python xxx/yourwork.py
then
pycharm -> run -> attach to process
select xxx/yourwork.py
now press ctrl+z in terminal you can see your pycharm stop at breakpoint
Done!
Enter (newline), then Ctrl+Z and finally Enter again works in the terminal of Rider on Windows (uppercase Z, not lowercase)