files icon indicating copy to clipboard operation
files copied to clipboard

Add focus sidebar action to window

Open jeremypw opened this issue 2 years ago • 3 comments

Fixes #51

Possible solution to allow users access to the sidebar without resorting to the mouse by pressing <Ctrl>Left. Note that the sidebar can already be unfocused with the shortcut <Ctrl>Right.

A possible alternative, or additional, solution would be to have a "Rename currently focused bookmark" action with an accelerator such as <Ctrl>F2.

jeremypw avatar Oct 31 '23 15:10 jeremypw

While the code seems good, when I test on an OS8 vm it does not seem to move focus to the sidebar.

zeebok avatar Aug 18 '24 17:08 zeebok

@zeebok Thanks for looking at this! I'll look at it again now I am working on OS8 Wayland.

jeremypw avatar Aug 18 '24 17:08 jeremypw

@zeebok Just tested under Wayland and X on OS8 and it works for me. It did stop working after a system update but reinstalling the branch fixed that. Maybe something to do with the vm or maybe that key combination is used for something else on your system?

jeremypw avatar Aug 18 '24 17:08 jeremypw

It is an open question whether we should also facilitate focusing the Storage listbox. After this PR is merged (which only focuses the Bookmark list) the Storage list can be focused by pressing Tab (<Shift>Tab to go the other way) but this is not so obvious.

jeremypw avatar Sep 08 '24 18:09 jeremypw

~I don't think this solves #51. I feel like OP is right that the current focus behavior is just weird. Gonna comment on the original issue~

Hm actually I'm not sure how to solve this really. It feels weird in general but I don't know what the solution is right now.

danirabbit avatar Sep 10 '24 23:09 danirabbit

@danirabbit I agree it is hard to find a good solution for the case where a user is using both mouse/touch and keyboard.

Maybe the focus should not switch to the view when a bookmark is activated with the keyboard? But that still does not fix #51. I do not that think that issue is really fixable since we do not know when a user clicks on a bookmark what it is that they intend to do next.

Either way, I imagine a keyboard (only) user would appreciate a convenient way of focusing the bookmarks that works whatever else is focused. Not sure what to do about focusing the storage or network entries though.

jeremypw avatar Sep 11 '24 10:09 jeremypw

Hm actually I'm not sure how to solve this really. It feels weird in general but I don't know what the solution is right now.

Since clicking on a bookmark causes no item to be selected, can we leverage that to have the rename action move to the last click item, in this case the bookmark?

zeebok avatar Sep 17 '24 19:09 zeebok

@zeebok This is a possibility, provided that as soon as a directory view item is selected then the rename action acts on that. It would still be not possible to rename the bookmark using the keyboard once the view has been used. The only solution for that (other than this one) would be to have a different shortcut for renaming bookmarks. It is a bit weird to have the same shortcut for two different actions anyway.

jeremypw avatar Sep 18 '24 08:09 jeremypw

It would still be no possible to rename the bookmark using the keyboard once the view has been used.

I think this would probably be fine, given the context of actions that have happened. Might be worth asking the issuer what they think since it is a scenario they are in more than we are?

It is a bit weird to have the same shortcut for two different actions anyway.

Totally agree, this is a very weird problem to solve hahaha

zeebok avatar Oct 05 '24 17:10 zeebok

Is there anything about this that blocks merging (even if it is not a full or ideal solution for the renaming issue)? As we already have <Ctrl>Right to move focus from sidebar to view a matching shortcut to move focus the other way seems logical.

jeremypw avatar Oct 06 '24 11:10 jeremypw

I don't think!

zeebok avatar Oct 08 '24 04:10 zeebok

@danirabbit Are you OK for this to be merged, at least pro tem? I'll fix the mentioned <Ctrl><Right> issue separately as it is outside the scope of this PR.

jeremypw avatar Oct 08 '24 10:10 jeremypw