210

I just started using Console2 as an alternative to cmd.exe

I can't figure out how to copy text from the console to the clipboard -- dragging over it with the mouse won't mark anything, and there is no option in the right-click menu to "mark" as in cmd.exe

It must be terribly obvious but I guess I'm overlooking it... :(

4
  • 2
    Console2 is not an alternative to cmd. It's just a different front-end for whatever console application you happen to run.
    – Joey
    Apr 20, 2010 at 8:05
  • I don't think Console2 works for any console other than cmd.exe. IIRC, the strange mouse behavior is because cmd.exe actually handles all of the window drawing itself, rather than using the standard windows APIs. As a result, it's behavior is a bit anachronistic.
    – Fake Name
    Apr 20, 2010 at 9:46
  • 3
    @Fake Name: (delayed comment) cmd.exe is a shell; it doesn't do any window drawing, only parses commands. The window it uses is a "Win32 Console" window. Console2 is a "console" or "terminal", a replacement for the ugly Win32 Console windows; the delay is because it has to poll a hidden "real" console window for changes. Mar 11, 2011 at 20:49
  • 2
    @FakeName, I use Console2 as a front end for 3 different terminals: cmd.exe, cygwin and Git Bash. The mouse seems to behaviour seems to be related Oct 4, 2012 at 9:34

10 Answers 10

213

Open Console2 menu Edit -> Settings, and in the Hotkeys / Mouse settings configure the selection and copy actions. The defaults are a bit wonky.

I use:

  • Left mouse button = select
  • Ctrl+C = copy
  • Ctrl+V = paste
  • ESC = clear selection

Make sure you press 'Assign' after each change you make otherwise it won't take effect.

Last note: Beware if you use ESC or Ctrl+V in vim, or in any other app.

9
  • 2
    Well this did not really work. I am still not able o select the text. The entry about holding shift helped though.
    – homaxto
    Aug 25, 2010 at 12:29
  • 2
    This configuration works great on my copy of Console2. Make sure that no other binding takes the Left-click action.
    – invert
    Aug 31, 2010 at 13:05
  • 6
    Works for me too. I actually have Left mouse button both for selecting text and copy/clear. May 13, 2011 at 12:07
  • 1
    Ha ha that is true. Good catch! I still prefer the sane defaults updated above :-)
    – invert
    Jul 27, 2012 at 7:33
  • 2
    I'm not sure if you need to assign "ESC" to clear selection. The selection seems to get cleared when you left-click again. I also have "Clear selection on copy" option checked. I usually like to use ESC key to clear commands in cmd.exe so I have not assigned any action to that key.
    – blissfool
    Feb 18, 2013 at 19:25
65

Holding SHIFT and marking the text should do the trick (at least for me). After this just click Edit -> Copy

3
  • 4
    Thanks! For me though it auto-copies it as soon as I finish marking the selection.
    – GJ.
    Apr 21, 2010 at 7:28
  • This works for me, but it must be a bug that only affects some people (2.00.148). On a previous machine, this wasn't required, and the UI doesn't indicate that SHIFT should be necessary. Apr 4, 2014 at 16:19
  • @GJ., that's due to the Select on copy option being checked. Feb 24, 2015 at 9:31
13

Console2's key and mouse assignment is a bit funky. Here's how to actually make left_click == select text:

  1. Open the Edit->Settings->Hotkeys->Mouse submenu.
  2. Select the "Select text" item. Then change the "Button:" line to be "Left" and un-check all three Modifiers boxes.
  3. Then click "Assign" - without this step none of your changes will actually take effect.
4

You can also just configure Select Text: Left Mouse Button

and then enable "Copy on select" on the "Behavior" tab under settings.

3

Console2 is not a shell. It is a console window enhancement. You can configure Console2 to run any shell you want such as cmd.exe or bash.

By default I believe the copy-paste functionality within the Console2 window is:

Select Text: Shift + Left Mouse Button
Copy Text: Left Mouse Button
Paste Text: Middle Mouse Button

note: by default, the right mouse button brings up a menu that allows you to configure Console2

You must Select and Copy text (by clicking the Left Mouse Button after you're done selecting). Simply selecting text does not copy it automatically (like the default windows console quick edit settings does).

2
  • Make sure Behaviour > Copy on select is unchecked
  • In Hotkeys > Mouse set the following (note, press Assign after changing settings to save them)
    • Copy/clear selection : Right
    • Select text : Left
    • Paste text : Right
    • Drag window : Middle
    • Context menu : Right + Ctrl

With this setup:

  • Dragging with Left mouse will select
  • With text selected:
    • Right click on selected text will copy it
    • Left or Right click anywhere else will clear selection without copying
  • Right click will paste unless there is text selected

This setup is the nearest I could get to the usual cmd Quick Edit mode operations so it doesn't confuse my muscle memory, but it has the advantage that you can dismiss selections without copying.

1
  • this is the dream setup!
    – Bobo
    Jan 18, 2013 at 20:24
2

Yes, Console2 is just a front-end and I also use it with msys bash, powershell, and the basic cmd.exe. The shortcuts may be the same for more than one function (I have left mouse button for select and clear selection). However, the default in the "behavior" tab in the settings defines BOTH automatic copy on select AND clear selection on copy, so it will look like the selection is immediately being discarded (the text is still being properly copied though). Just uncheck the clear selection on copy and the selected text will stay highlighted.

Console2 is pretty great btw :)

2

The default settings are awkward. I like these:

enter image description here

enter image description here

2

Click + Hold Shift does the highlighting as you probably think.

2
  • 1
    This is just a copy of another answer
    – DavidPostill
    Sep 27, 2014 at 20:09
  • 1
    Well DavidPostill, it's a long post and I couldn't find it. I have struggled with this seemingly obvious thing and I hoped to help someone else.
    – httpete
    Sep 28, 2014 at 1:08
1

I completed the settings above, and found that console2 select fails sometimes, i.e. on a particular console2 screen I can select some text but some text won't select.

The answer was a window sizing bug. If you start console2 then drag the window to be taller, you may find that anything below the original lower border of the screen is not selectable. If you drag the bottom edge of the console up and down a little, it seems to correct itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .