13

I want to terminate some program with use Ctrl-C in Eclipse console - how can I emit such keys stroke?

I need to test on KeyboardInterrupt exception code in debug mode with PyDev but it not matter if I will send Ctrl-C it will works.

Chameleon
  • 9,722
  • 16
  • 65
  • 127

2 Answers2

0

How to emit Ctrl-C (keyboard interrupt) in Eclipse console?

You can Try Ctrl + Z

hv_ntt
  • 45
  • 3
-2

To change keyboard bindings go to Window > Preferences > General > Keys and find "Terminate" with a red box by its name. Then click the box where it says "Ctrl + F2" and hold Ctrl + C.

Visual Example: http://imageupper.com/g/?S020001004M14616836161626229

Nathan Meyer
  • 409
  • 1
  • 6
  • 13
  • 9
    Nope - at least, not for me. The Eclipse "Terminate" doesn't merely send a SIGINT (on \*Nix, or equiv on Win\*), it does something harsher - probably a SIGKILL (or equiv). Thus, it does NOT emulate a Ctrl-C (Break) from the console input; thus, it does NOT trigger a `KeyboardInterrupt` exception. (・᷄ ︵・᷅) – Stevel Apr 28 '16 at 13:28