I often use the filter bar to find a child folder inside a folder with many other items.
To do this I press CTRL+I and enter some characters of the child folder I'm looking for.
Once it is displayed (perhaps together with a few other items) I need to use the mouse to click it.
It would be much more comfortable if there was a shortcut to place the keyboard focus back in the items, then choose the item using the arrow keys, press return to enter the folder and then again CTRL+I to search for another item in the child directory.
Of course there is the option to use TAB or SHIFT+TAB, but it needs to be pressed several times (3 times here), so this is a bit cumbersome.
Can't we simply switch focus back to the file/folder view when pressing the return key ?
Filtering itself is done on the fly when entering some characters, so pressing return could 'confirm' the filter results and switch the focus back.
I think this would improve keyboard-only usage of the filter bar greatly.
Created attachment 73089 [details]
Patch for suggestion in comment #1
The attached patch returns focus back to the file/folder view when pressing return in the filter bar.
I don't know if this is the perfect way to do this as I'm not really an experienced C++ programmer, but it works :-)
It is better to use reviewboard.kde.org for submitting patch. Patches attached in bugzilla are easily to b flood by many other messages and forgotton.
Resetting assignee to default as per bug #305719
(In reply to comment #3)
> It is better to use reviewboard.kde.org for submitting patch. Patches
> attached in bugzilla are easily to b flood by many other messages and
I signed up to git.reviewboard.kde.org and tried to submit the patch, but reviewboard insists on telling me that my patch file is no diff :-(
Even after I renamed it to .diff ...
Thanks for the report and the patch! I was not aware of this report at all - I am only notified about all new comments to existing bug reports since the assignee change on August 24.
I have no idea why ReviewBoard doesn't like your patch :-(
Anyway, I think that the idea to focus the view when Return is pressed in the filter bar is nice :-)
Some notes on the implementation:
1. We should not only test for the "Return" key, but also for "Enter". These are considered mostly equivalent by users, so we should treat them equally.
2. The cleaner solution (even though it requires more code) would be to use signals and slots to tell the DolphinViewContainer to change the focus. Look how the Escape key is handled - maybe we could do something similar here and add a new signal "focusViewRequest" which is connected to a new slot in the view container that focuses the view.
(In reply to comment #6)
I finally found some time and adapted the patch to your suggestions. You may find it here: https://git.reviewboard.kde.org/r/109020/
Git commit 2f0114730d1f5c3dfaee833300168b8e16b068f2 by Frank Reininghaus, on behalf of Jens Rutschmann.
Committed on 19/02/2013 at 22:42.
Pushed by freininghaus into branch 'master'.
Return the focus from the filter bar to the view if Enter is pressed
M +8 -0 dolphin/src/dolphinviewcontainer.cpp
M +5 -0 dolphin/src/dolphinviewcontainer.h
M +12 -1 dolphin/src/filterbar/filterbar.cpp
M +5 -0 dolphin/src/filterbar/filterbar.h