files icon indicating copy to clipboard operation
files copied to clipboard

Re-work selection actions

Open cassidyjames opened this issue 3 years ago • 2 comments

Following up on this:

I'm realizing the way the shortcuts work in master is pretty confusing. If zero or one thing is selected, Ctrl+A selects all, but if all but one thing is selected, Ctrl+A deselcts all, but if everything is selected, Ctrl+A doesn't do anything… etc.

But yeah, getting the shortcuts in the menu sounds good to me and then we should follow up and sort out how those shortcuts actually work.

Originally posted by @cassidyjames in https://github.com/elementary/files/issues/1904#issuecomment-988326581

cassidyjames avatar Dec 08 '21 22:12 cassidyjames

On that issue I also thought this would make sense:

  • Nothing selected:
    • Select All
  • One or more (but not all) items selected:
    • Select All
    • Invert Selection
    • Deselect All
  • All items selected:
    • Deselect All

Thinking about shortcut complexity, I do wonder if there is value in separate "Select All" and "Deselect All" actions, or if this would be sufficient:

  • Nothing selected:
    • Select All CtrlA
  • One or more (but not all) items selected:
    • Select All CtrlA
    • Invert Selection ShiftCtrlA
  • All items selected:
    • Deselect All CtrlA

It would mean deselecting all would require hitting Ctrl+A twice if you have some things selected.

cassidyjames avatar Dec 08 '21 22:12 cassidyjames

Note that "Deselect All" can also be accomplished by pressing Esc although that is not an action keybinding - it is implemented by a key press handler and has a number of effects depending on the context. So another solution is to not have a "Deselect All" action and expose that shortcut in the menu by other means.

jeremypw avatar Dec 09 '21 11:12 jeremypw