moar icon indicating copy to clipboard operation
moar copied to clipboard

Feature request: selection for other Windows terminals

Open luc0x61 opened this issue 3 months ago • 9 comments

It's great to see that now text can be selected on Windows Terminal! I wonder if that can be enabled also for cmder/ConEmu - I definitely have no idea on how complex it can be.

Thanks!

luc0x61 avatar Sep 16 '25 07:09 luc0x61

Do you have access to Windows and cmder?

If so, can you verify that both marking and mouse scroll works with:

moor --mousemode=select some-file.txt

walles avatar Sep 16 '25 17:09 walles

And the same test for ConEmu?

walles avatar Sep 16 '25 17:09 walles

So four things to test with that command line:

  • marking text in moor --mousemode=select on cmder
  • mouse scroll in moor --mousemode=select on cmder
  • marking text in moor --mousemode=select on ConEmu
  • mouse scroll in moor --mousemode=select on ConEmu

walles avatar Sep 16 '25 17:09 walles

I'm late, but I did more than four tests. I tested with --mousemode=select with

  • cmder (in ConEmu)
  • cmd in ConEmu
  • TCCLE in ConEmu
  • directly with cmd.exe (outside ConEmu).

All of them work on marking text now. Within ConEmu I can select in lines/stream and in blocks (I guess it does that by seeing how I move the mouse, first in X direction or in Y direction); in cmd.exe only line/stream selection is active. None of the above works for mouse scroll.

luc0x61 avatar Sep 19 '25 15:09 luc0x61

Thanks for checking!

My approach so far has been to treat mouse scrolling as more important than selecting text.

So if mouse scrolling stops working in those terminals with --mousemode=select, I'll let moor's auto configuring be as it already is for those.

In your case, if selection is more important than mouse scrolling, you should set your MOOR environment variable to --mousemode=select to get that behavior everywhere.

Another approach would be to ask the vendors of those terminals to default to reporting mouse scroll events as arrow key presses, which is what most terminals do. That would make --mousemode=select get you both marking and mouse scrolling at the same time.

walles avatar Sep 20 '25 05:09 walles

So if mouse scrolling stops working in those terminals with --mousemode=select, I'll let moor's auto configuring be as it already is for those.

Oh well, note that scrolling with the mouse works only from cmd.exe terminal window: invoking cmd as shell in ConEmu/clink doesn't lead to mouse scrolling within moor

Another approach would be to ask the vendors of those terminals to default to reporting mouse scroll events as arrow key presses, which is what most terminals do. That would make --mousemode=select get you both marking and mouse scrolling at the same time.

Mmmh... maybe I'll look for more information

luc0x61 avatar Sep 23 '25 06:09 luc0x61

Does mouse scrolling not work with moor in those terminals if you call it like this?

moor --mousemode=scroll

If that's the case, those terminals simply don't support mouse scrolling in any way. Never encountered that before, I'm surprised.

Can you (re?) check?

walles avatar Sep 23 '25 18:09 walles

Actually if moor's choice is between:

  • Nothing (because mouse scroll isn't supported anyway)
  • Selection works

Then "just selection" is better than "neither mouse scroll nor selection".

If you can confirm that for both cmder and ConEmu:

  • Selection works with --mousemode=select
  • Mouse scroll does not work with --mousemode=scroll

Then I'll be happy for moor to default to selection on those two.

walles avatar Sep 23 '25 19:09 walles

That is my own fault: ConEmu / cmder starts with settings to not send mouse events to the console. You need to go to Settings > Keys & Macro > Mouse > Mouse options > Send mouse events to console This way, surprise, mouse events get to the console.

Now, with environment as set MOOR=--mousemode=select (still in Settings > Startup > Environment), I have both selection and scrolling active with the mouse.

luc0x61 avatar Sep 26 '25 06:09 luc0x61