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

2
Avatar
Permanently deleted user

Hi Graham,

It's not possible to do that at the moment

Denis

0
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

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

1

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

2
Avatar
Permanently deleted user

Ctrl+D I have resolved the problem.

Thanks!

0
Avatar
Permanently deleted user

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

6
Avatar
Permanently deleted user

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

Enter (newline), then Ctrl+Z and finally Enter again works in the terminal of Rider on Windows (uppercase Z, not lowercase)

1

请先登录再写评论。