How do I move the Windows Command Prompt cursor with the mouse?

0

When I click in Command Prompt, it just selects the character I click and leaves the cursor where it is. I only seem to be able to move the cursor with the keyboard. How do I use the mouse to move the cursor to where I click?

Kyle Delaney

Posted 2018-01-11T16:30:58.907

Reputation: 1 059

1I research my questions beforehand. I'm clear and concise. And still the downvotes come without explanation. Sigh. – Kyle Delaney – 2018-01-11T21:43:40.860

Agreed! Answer is below now. – Matt – 2018-11-08T16:38:07.723

Answers

2

Windows command prompt only support mouse for selection and menu (right click). You can move the cursor by using arrow keys.

You also can read this for moving your cursor faster.

Pierre LAGOUTTE

Posted 2018-01-11T16:30:58.907

Reputation: 72

2With exceptions of programs that actually support the mouse, which are few. – LPChip – 2018-01-11T17:13:04.777

I don't know, any, thank you for the information ;) – Pierre LAGOUTTE – 2018-01-11T17:14:01.817

2The old EDIT supports mouse, but was part of MS-DOS. Any dos program can support the mouse really. But just the command prompt itself, mostly none. – LPChip – 2018-01-11T17:15:40.713

2

Consoles can be quite a confusing topic. The short answer is that cmd.exe run from the vanilla Windows Console does not support this, but you could use a more advanced application such as ConEmu which seems to support it.

The important thing to remember is that the "Console" only refers to the GUI part. When you start a "console application" (aka text only application) such as the Command Prompt (cmd.exe), the Powershell (powershell.exe), or the non-GUI VIM for windows (vim.exe), a console window is automatically opened to allow text based interaction with the program. ConEmu even seems to implement the xterm mouse protocol (which is just an additional set of special characters sequences) so you could use the mouse to interact with VIM.

Furthermore, the old Virtual Dos Machine is still available in all 32-Bit versions of Windows, including Win 10, so DOS applications with mouse support should work out of the box.

Edit: Some Additional Information:

Disclaimer: I personally don't bother with ConEmu since cmd.exe + clink or mintty work well enough for me, nor am I very familiar with the Win32 API, caveat emptor.

Having said that, it seems that the windows text only build of VIM is perfectly capable of providing mouse support from inside the standard console, supposedly by using the Win32 API. From this we can conclude that cmd.exe could provide similar functionality and that not doing so is not a limitation of the standard windows console per se.

T Nierath

Posted 2018-01-11T16:30:58.907

Reputation: 389

This is the answer. I had this same question.

Install ConEmu Go to settings->Mouse Uncheck the box: Send mouse events to console Uncheck this to stop sending mouse events to console, mouse will be processed by ConEmu internally (text selection, for example) – Matt – 2018-11-08T16:36:33.443