Is it possible to make Ctrl+C as responsive as Ctrl+Break in the Windows 7 console?

There's no setting that I know of, but you can accomplish this with an AutoHotkey script.

The script

^c::
    WinGetClass, WinClass, A
    if(WinClass = "ConsoleWindowClass")
        SendPlay ^{CtrlBreak}
    else
        SendPlay ^c

How it works

  • ^c specifies the key combination to modify: Ctrl + C (^ indicates Ctrl).

  • WinGetClass, WinClass, A stores the active window's title in the variable WinClass.

  • if(WinClass = "ConsoleWindowClass") ... else ... checks if WinClass macthes the string ConsoleWindowClass (the window class of the Windows 7 command prompt).

    • If it does, SendPlay ^{CtrlBreak} simulates the key combination Ctrl + Break.

    • Otherwise, SendPlay ^c simulates the key combination Ctrl + C.

      This way, other programs still behave as they should.

How to use

  1. Download and install the latest version of AutoHotkey.

  2. Save the above script as break-on.ahk, using your favorite text editor.

  3. Double-click the file to run the script.

  4. If you wish, copy the script (or a link to it) in the Startup folder.