mridgers / clink

Bash's powerful command line editing in cmd.exe
mridgers.github.io/clink
GNU General Public License v3.0
3.15k stars 286 forks source link

Mouse click #572

Closed Remiol closed 2 years ago

Remiol commented 2 years ago

What a great idea! Great that I can now use the usual commands again.

It's just that... I can't use my mouse now. Clicking with my mouse in the middle of the line (to insert some text) no longer works. How can I make my mouse work as before?

chrisant996 commented 2 years ago

How were you getting mouse clicking to move the text insertion point? That has never worked in CMD in ConHost, nor in Windows Terminal.

Ah, I'm pretty sure you are talking about a feature that ConEmu provides. Unfortunately, you get either click in ConEmu, or all of Clink. Can't have both at the same time.

chrisant996 commented 2 years ago

But also, this repo has been abandoned for years. Go to https://github.com/chrisant996/clink instead.

Remiol commented 2 years ago

Yes, I could do it in Windows Console and indeed I'm using mostly ConEmu. Agree it doesn't work in Windows Terminal.

ps: is there a way to temporary disable clink?

Sorry, I'll use the christant996 repo next time.

chrisant996 commented 2 years ago

Yes, I could do it in Windows Console and indeed I'm using mostly ConEmu. Agree it doesn't work in Windows Terminal.

ps: is there a way to temporary disable clink?

Sorry, I'll use the christant996 repo next time.

Can you clarify what you have in mind for "temporarily disable Clink"? And what is an example of a scenario where you want to do so?

Remiol commented 2 years ago

Just to use the click within the text function once in a while or when there is a hotkey conflict.

It would be nice that there is something like toggle Clink --> enable/disable Clink

chrisant996 commented 2 years ago

You mean a key binding to disable/enable Clink?

That's not really possible: Clink can't respond to a key binding to enable Clink when Clink is disabled. It's disabled, so it's not running.

Also, disabling (or enabling) Clink means exiting the current input prompt, telling CMD that a blank line was entered, showing a new prompt on a new line, and then letting the OS or ConEmu handle input for the next input line, instead of Clink.

If the reason for disabling/enabling Clink is to allow mouse input on the fly, that won't work at all.

I'm exploring what options exist for allowing mouse input in Windows Terminal, ConEmu, and plain console windows. If a terminal supports certain DECSET escape codes for mouse tracking then it might be possible to get this to partially work, but probably at the expense of losing all mouse features from the terminal program itself (such as click+drag to select text and copy it to the clipboard).

chrisant996 commented 2 years ago

@Remiol you can close this. I created an issue in the current repo.

Remiol commented 2 years ago

Thank you for your support 👍