9001/copyparty

Client-side setting to use ctrl-click for multiselect

Closed this issue · 7 comments

Right now, to select anything, I think your only option is to press the multiselect button explicitly and then start clicking files.

I would love if it was like any other file ui, from windows explorer to google photos, where you can ctrl+clicking to initiate multi-select. Just makes things faster and more intuitive.

Browsers by default make ctrl-click "open link in new tab" I think (same as middle click), at least firefox does, so it'd probably be annoying to users if that functionality was "removed". And it'd maybe be overkill as a full on config option (though I wouldn't be against a "enable by default" setting like with grid). I think it'd be nice to at least have that as a toggle in the little cog menu at the top.

9001 commented

Good idea! Will add it as a gui option at least :>

9001 commented

Actually on second thought, would it be OK to do this as shift-clicking instead of ctrl-clicking? I don't think that is supposed to do anything by default in browsers (please correct me if i'm wrong) -- which means that it could be enabled by default :>

Shift-clicking on thing around - it seems that it opens links in a new window :p

(Interestingly, it seems copyparty doesn't do that right now)

But more so than that, if I'm shift-clicking on something in regards to file selection - I actually kinda expect it to act as a "select until" mode, e.g.

explorer_cCN637GGBT.mp4

(I wanted to suggest that alongside ctrl-clicking, but wasn't sure if it'd be too annoying, esp since it's working with css grids. I would absolutely love it though.)

If it matters, shift-click to open in new window and shift-click to "select until" are both true for Google Photos. The way they solve it, is if you're not in multiselect mode, shift-clicking will open in a new window. If you have items selected at all, shift-clicking will select until cursor position.

At least to me, ideally, it'd be "Ctrl-click to intiate selection mode, then continue ctrl/shift-clicking to select things.", like I do in my file explorer/photos/etc. But if you're used to ctrl/shift clicking to open in new tabs/windows, you can toggle a setting to disable the selection 'hotkeys' and use default browser ctrl/shift clicks. The multiselect button is awlays available to initiate selections ether way.

icxes commented

I'll have to chime in here - I've been thinking of asking about a select-until feature for quite some time now but just haven't gotten around to it. Just to let you know there's more than one person who would use that

9001 commented

There is now a default-disabled option in the client settings (the sel button) to enable file selection with CTRL and SHIFT, both in the list-view and grid-view.

When enabled, it is possible to start a selection range by CTRL-clicking a file, and then SHIFT-clicking another file to copy the first file's selection state to all files in-between.

I tried to make the behavior intuitive, but not entirely sure I succeeded...

  • when you click the initial thumbnail or list-row, then that file becomes the "selection origin"
  • SHIFT-clicking a file way further down will then select everything in-between
  • immediately shift-clicking another file a bit further up will then shrink the selection by unselecting everything between the last two clicks, much like it does on most other file managers

where it gets a bit funky is how it also lets you shift-select multiple ranges; you can CTRL-click another file to initiate a new selection origin, and then SHIFT-click elsewhere to add another selection range. This is unlike most other file managers, which clear the entire selection when a new shift-selection is made. And copyparty also lets you shift-select a range into NOT being selected, by starting the selection from a file that is unselected, specifically by ctrl-clicking a file which is already selected and then shift-selecting from there. (if that makes sense...)

I've uploaded a beta at https://ocv.me/copyparty-sfx.py -- will be testing this a bit more and hopefully post the release late tonight/tomorrow. Will be the last version until mid-august so hopefully I didn't break anything :>

you can CTRL-click another file to initiate a new selection origin, and then SHIFT-click elsewhere to add another selection range
copyparty also lets you shift-select a range into NOT being selected, by starting the selection from a file that is unselected, specifically by ctrl-clicking a file which is already selected and then shift-selecting from there.

That's...actually kind of cool? I can 100% see myself using that, so I'm certainly not complaining c:

Thanks as always!

9001 commented

Quick update since I noticed a few things,

  • when the same region is selected multiple times, the selection is toggled for each selection (like in most file managers)
  • shift-selection is now always enabled in list-view (since the shift-key doesn't serve an existing purpose when clicking entire rows anyways)
  • shift-clicking thumbnails (when all selection modifiers are disabled) didn't open them in a new window as expected
  • when enabling the multiselect-toggle in grid-view, this also enables shift-click selection (bit more intuitive)

the beta has been updated, as well as the demo server -- think it's good to go now 👍