How to enter EOF (Ctrl+z) in Run console?

Answered

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

8 comments
Comment actions Permalink

Hi Graham,

It's not possible to do that at the moment

Denis

0
Comment actions Permalink

OK, thanks. Disappointing, but better to know than to wonder if I've missed something!
-- Graham

0
Comment actions Permalink

I have the same exact problem on a mac.
<Ctrl>+d is not giving EOF indicator when pressed in the console/run window.

1
Comment actions Permalink

The hotkey is Ctrl+D as stated in the fixed issue above

2
Comment actions Permalink

Ctrl+D I have resolved the problem.

Thanks!

0
Comment actions Permalink

For Mac users, the shortcut is <command>+D

3
Comment actions Permalink

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!

0

Please sign in to leave a comment.