Bug 394939 - Enter key not working when cursor in search bar
Summary: Enter key not working when cursor in search bar
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.7.0
Platform: Kubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Nikita Melnichenko
URL:
Keywords: reproducible, triaged
Depends on:
Blocks:
 
Reported: 2018-06-02 08:58 UTC by milkaca
Modified: 2018-06-22 08:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description milkaca 2018-06-02 08:58:01 UTC
This is how to reproduce it:
1. I went into root location (/)
2. Started to type "home"
3. Search bar appeared at the bottom of active panel
4. home folder become selected in panel
5. Enter key pressed and nothing happend

If I press right arrow key (in 5th step), home folder will be opened.

Enter key should also open selected folder or execute file (if file is selected item in panel instead of folder). Basically normal behavior of Enter key should work when Search bar is active.

This is very annoying and I hope that it will be fixed. Thank you for great peace of software.
Comment 1 Toni Asensi Esteve 2018-06-02 15:02:34 UTC
Thank you, Alan! In my keyboard (an HP one) there are two keys that have the same arrow printed on them, without text. And I though, in this bug report, in this particular case maybe they are considered differently (they would be the Return key and the Enter key)... and WOW! I've just seen that, when typing in search bar, the Return key behaved differently than the Enter key! For example the Return key executed the command (and entered folders) when typing in search bar, but the Enter key did not...
Comment 2 Toni Asensi Esteve 2018-06-02 15:03:38 UTC
Also, after pressing Return, the file is executed but... later the search bar is still seen (and the user has to press Esc, for example).
Comment 3 milkaca 2018-06-02 15:17:35 UTC
Welcome, super finally you have the same behaviour at your side. :)

Of course, when one press Enter or return key search bar should dissapear.
Comment 4 Nikita Melnichenko 2018-06-02 21:33:42 UTC
(In reply to Toni Asensi Esteve from comment #1)
> Thank you, Alan! In my keyboard (an HP one) there are two keys that have the
> same arrow printed on them, without text. And I though, in this bug report,
> in this particular case maybe they are considered differently (they would be
> the Return key and the Enter key)...

Do you mean Enter on the main part of the keyboard vs. Enter on Numeric Keypad? I confirm the latter does not trigger. They are treated differently in Qt, indeed.

(In reply to Toni Asensi Esteve from comment #2)
> Also, after pressing Return, the file is executed but... later the search
> bar is still seen (and the user has to press Esc, for example).

If the directory is changed, the search bar disappears. The question is whether it should disappear on regular files. I argue that it should not, it's a useful feature that you can run, view, select, etc. files without canceling the search.  In fact, I use this feature from time to time.
Comment 5 milkaca 2018-06-02 22:37:44 UTC
1. I was referring to the main Enter key.
2. When you change folder it should definitely disappear in my opinion.
Comment 6 Nikita Melnichenko 2018-06-03 05:00:15 UTC
(In reply to amilino from comment #5)
> 1. I was referring to the main Enter key.
We can't reproduce this yet. Can you try under a newly created user? It may be related to some of your settings. What are Qt5 and KF5 versions installed?

> 2. When you change folder it should definitely disappear in my opinion.
Once we solve #1, you should get #2 automatically.
Comment 7 milkaca 2018-06-03 08:23:52 UTC
Kubuntu: 18.04
KDE Plasma Version: 
Qt version: 5.9.5
Comment 8 milkaca 2018-06-03 08:28:43 UTC
I already tried with the new user and without touching any settings. I have Jumper EZbook 3L Pro 14" Laptop, Intel Apollo Lake N3450 6GB RAM 64GB eMMC 

Kubuntu: 18.04
KDE Plasma Version: 5.12.5
KDE Framework Version: 5.44.00
Qt version: 5.9.5
Kernel version: 4.16.13-041613-generic
OS Type: 64-bit
Comment 9 Toni Asensi Esteve 2018-06-04 12:54:00 UTC
Just in case, in
    https://en.wikipedia.org/wiki/File:Enter.png
there's an illustrative photograph, and it's written:
    "The return key is on the left and circled in red, and has the carriage return symbol ↵ printed on it. The enter key is on the right and circled in green, and has the word "Enter" printed on it.
Comment 10 Toni Asensi Esteve 2018-06-04 12:59:58 UTC
> > > Also, after pressing Return, the file is executed but... later the search
> > > bar is still seen (and the user has to press Esc, for example).

> > Of course, when one press Enter or return key search bar should dissapear.

> If the directory is changed, the search bar disappears. The question
> is whether it should disappear on regular files. [...]

Mmm... once someone has quicksearched something and pressed Return, it's very inusual that he doesn't press Esc.

Maybe that's the reason why Total Commander, Midnight Commander, Double Commander and Krusader 2.4.0-beta3 also work this way: when the user presses Return, the quicksearch ends.
Comment 11 milkaca 2018-06-04 13:19:01 UTC
Sorry my mistake I was referring to Return key all the time.

It is strange that you cannot reproduce this issue. I have also tested this on my second laptop.
Comment 12 milkaca 2018-06-05 15:18:42 UTC
Any news on this issue, status is "Confirmed" so I am just wondering?
Comment 13 Nikita Melnichenko 2018-06-06 05:01:41 UTC
(In reply to amilino from comment #12)
> Any news on this issue, status is "Confirmed" so I am just wondering?

Status is Confirmed for Enter key on Numeric Keypad and not for Carriage Return. I noticed you're testing on laptops, maybe the keyboards on your laptops send different keycodes, for example they send Key_Enter instead of Key_Return.

Please try the following:
1. Run krusader in debug mode from console:
krusader -d 2>&1 | tee krusader-debug.log
2. Perform a quick search for a folder and press Enter.
3. Close the app.
4. Attach krusader-debug.log here.

Thanks.
Comment 14 milkaca 2018-06-07 19:27:44 UTC
Here goes:

21:25:57.514-warning default unknown@0 # QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
21:25:57.626-debug default unknown@0 # System icon theme: "breeze"
21:25:57.737-debug default unknown@0 # Bookmark search: reset
21:25:57.741-warning default unknown@0 # QWidget::insertAction: Attempt to insert null action
21:25:57.748-warning default unknown@0 # QWidget::insertAction: Attempt to insert null action
21:25:57.797-warning default unknown@0 # Trying to convert empty KLocalizedString to QString.
21:25:57.962-debug default unknown@0 # URL= "file:///home/amilino" ; name to current= ""
21:25:57.962-debug default unknown@0 # URL= "file:///home/amilino" ; name to current= ""
21:25:59.631-debug default unknown@0 # from current dir= "" ; to= "file:///home/amilino/Documents/VirtualPanel"
21:25:59.631-debug default unknown@0 # refresh internal to URL= "file:///home/amilino/Documents/VirtualPanel"
21:25:59.631-debug default unknown@0 # start local refresh to URL= "file:///home/amilino/Documents/VirtualPanel"
21:25:59.872-debug default unknown@0 # from current dir= "" ; to= "file:///"
21:25:59.872-debug default unknown@0 # refresh internal to URL= "file:///"
21:25:59.872-debug default unknown@0 # start local refresh to URL= "file:///"
21:26:01.098-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_H, text="h")
21:26:01.098-debug default unknown@0 # key event= QKeyEvent(KeyPress, Key_H, text="h")
21:26:01.154-debug default unknown@0 # scroll to item; name= "home"  index= QModelIndex(5,0,0x0,ListModel(0x55c796c03b40))
21:26:01.320-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_O, text="o")
21:26:01.320-debug default unknown@0 # key event= QKeyEvent(KeyPress, Key_O, text="o")
21:26:01.465-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_M, text="m")
21:26:01.465-debug default unknown@0 # key event= QKeyEvent(KeyPress, Key_M, text="m")
21:26:01.610-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_E, text="e")
21:26:01.610-debug default unknown@0 # key event= QKeyEvent(KeyPress, Key_E, text="e")
21:26:02.223-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_Enter, KeypadModifier, text="\r")
21:26:05.371-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_Alt, AltModifier)
21:26:07.907-debug default unknown@0 # key press event= QKeyEvent(KeyPress, Key_Alt, AltModifier)
Comment 15 milkaca 2018-06-07 19:33:38 UTC
Ok, so on my laptop Carriage return key is interpreted as Enter, now everything is clear. Looking forward to the fix in upcoming versions.
Comment 16 Nikita Melnichenko 2018-06-13 08:28:20 UTC
Git commit e5d8a1ce284ab8713605dc5ce2e66fef54355154 by Nikita Melnichenko.
Committed on 13/06/2018 at 08:27.
Pushed by melnichenko into branch 'master'.

Fixed using of a Numeric Keypad in the quick search mode

Properly handled Enter, arrows and other buttons from the keypad.

FIXED: [ 394939 ] Enter key not working when cursor in search bar

Differential Revision: https://phabricator.kde.org/D13443

M  +7    -5    krusader/Panel/krsearchbar.cpp

https://commits.kde.org/krusader/e5d8a1ce284ab8713605dc5ce2e66fef54355154
Comment 17 milkaca 2018-06-18 21:19:40 UTC
Hi Nikita, thank you for the fix. I was using before this ppa to install it on my Kubuntu: sudo add-apt-repository ppa:kubuntu-ppa/experimental

But today I don't see Krusader in repository any more, and of course your last commit is not in ppa. So my next question is what is the best way to install latest version with this commit included? The best way would be of course to have it in some ppa repository but who knows when it will be available and where.
Comment 18 milkaca 2018-06-19 06:55:57 UTC
Ok, I found it and Enter key is now working like a charm:
https://launchpad.net/~rikmills/+archive/ubuntu/experimental

Have one more question is it possible to somehow configure quick search to search in like mode? I mean it is working if I start typing with * sign, but would be nice to have this somewhere in options.
Comment 19 Nikita Melnichenko 2018-06-19 23:41:48 UTC
> Have one more question is it possible to somehow configure quick search to
> search in like mode? I mean it is working if I start typing with * sign, but
> would be nice to have this somewhere in options.

There is no such option. You can use filter mode (Ctrl+I) instead. It matches the string in the way you want.
Comment 20 Nikita Melnichenko 2018-06-22 08:00:45 UTC
Git commit f8a1e5144a7aadff3c6954c27306a896b9535309 by Nikita Melnichenko.
Committed on 22/06/2018 at 07:56.
Pushed by melnichenko into branch '2.7'.

Fixed using of a Numeric Keypad in the quick search mode

Properly handled Enter, arrows and other buttons from the keypad.

FIXED: [ 394939 ] Enter key not working when cursor in search bar

Differential Revision: https://phabricator.kde.org/D13443

(cherry picked from commit e5d8a1ce284ab8713605dc5ce2e66fef54355154)

M  +7    -5    krusader/Panel/krsearchbar.cpp

https://commits.kde.org/krusader/f8a1e5144a7aadff3c6954c27306a896b9535309