Bug 374238

Summary: Left/Right arrow behavior wrong (brief mode): doesn't navigate columns but changes directory
Product: [Applications] krusader Reporter: Gennady Uraltsev <gennady.uraltsev>
Component: generalAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: alex.bikadorov, gennady.uraltsev, krusader-bugs-null
Priority: NOR    
Version First Reported In: 2.5.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The git bisect log

Description Gennady Uraltsev 2016-12-28 07:44:52 UTC
Created attachment 103031 [details]
The git bisect log

The behavior of the arrow keys has had an unexpected change. 

Now, when in "brief" view, pressing the right key descends into the folder under the cursor while pressing the left key goes up a level.
Previously one could use left and right keys to navigate the multiple columns in the brief view. Now it seems there is no way, except mouse, to do this.

Notice that the current new behavior of krusader is not standard. All other file managers (including mc) use the right - left arrow keys to navigate columns. If this behavior was changed on purpose then including a config toggle would be great!

Furthermore it seems that there is no way to navigate large columns of files now without a mouse. Before I had ctrl+up bound to go to parent folder and "enter" descended into a folder.

The regression was introduced in this commit. Since this is not a documented change of behavior I believe this to be a bug. 

In any case, if not reverting the previous behavior, it would be nice to at least have a configuration toggle for this.

commit 52757fc37fc96064449edeee8ad4a4eb89d87723
Author: Alexander Bikadorov <bikaejkb@mailbox.tu-berlin.de>
Date:   Sun Jul 10 20:23:31 2016 +0200

    New KrSearchBar class as replacement for QuickSearch, Quckfilter and Quick select
   
    Reviewers: #krusader, martinkostolny
   
    Reviewed By: #krusader, martinkostolny
   
    Subscribers: asensi, martinkostolny
   
    Maniphest Tasks: T3140
   
    Differential Revision: https://phabricator.kde.org/D2105
Comment 1 Gennady Uraltsev 2016-12-28 14:36:00 UTC
I have done some extra investigating. 

Apparently the code for handling the key strokes relevant to this question is in the file 
Panel/krview.cpp
while the code relevant to brief view is in 
Panel/krinterbriefview.cpp

In particular the code responsible for the classical behavior in brief view (i.e. navigating columns) starts starting from line 145 of "Panel/krinterbriefview.cpp" in function
void KrInterBriefView::keyPressEvent(QKeyEvent *e)

but it never gets executed! The code that DOES get executed is in function
bool KrView::handleKeyEventInt(QKeyEvent *e)
starting from line 645 of "Panel/krview.cpp"

I am no expert in programming but may it be that the KrInterBriefView class should override the function in KrView?
Comment 2 Alex Bikadorov 2016-12-29 17:42:38 UTC
Git commit 991d28b4c9d14d860583cffd2b778d0f46c4f528 by Alexander Bikadorov.
Committed on 29/12/2016 at 17:28.
Pushed by abikadorov into branch 'master'.

FIXED: [ 374238 ] Handle left/right arrow key press in brief view (previously filtered by search bar).

Quickfix. It is maybe better to remove the filtering in KrSearchBar and instead get all key events from KrView.
Bug came with 374238.

M  +16   -6    krusader/Panel/krinterbriefview.cpp
M  +2    -0    krusader/Panel/krinterbriefview.h

https://commits.kde.org/krusader/991d28b4c9d14d860583cffd2b778d0f46c4f528
Comment 3 Alex Bikadorov 2016-12-29 17:46:18 UTC
Thanks for the detailed report. The behaviour change was clearly unintended. Fixed now.
Comment 4 Gennady Uraltsev 2016-12-29 17:52:10 UTC
Thanks a lot! I really rely on Krusader. It is a great piece of software. I appreciate your effort!