Bug 450040 - Clipboard manager can't navigate item list with keyboard after focusing the search input
Summary: Clipboard manager can't navigate item list with keyboard after focusing the s...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard (show other bugs)
Version: 5.24.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-11 20:48 UTC by TYY331
Modified: 2022-02-22 06:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.24.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TYY331 2022-02-11 20:48:46 UTC
STEPS TO REPRODUCE
1. Open Clipboard manager widget
2. Focus the search box
3. Use Keyboard up/down arrow to select items from the list

OBSERVED RESULT
No items are selected and instead the list view is moved with the keyboard

EXPECTED RESULT
Keyboard up/down arrow keys select and move throughout the clipboard list.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-02-15 22:08:35 UTC
Works for me on Wayland. Are you on X11? If so can you try on Wayland?
Comment 2 TYY331 2022-02-16 13:58:58 UTC
(In reply to Nate Graham from comment #1)
> Works for me on Wayland. Are you on X11? If so can you try on Wayland?

I can reproduce it on both X11 and Wayland, I've tried creating a new user account and the problem still persists.
Plasma 5.24.1, KDE Frameworks 5.91, Qt 5.15.2
Comment 3 Nate Graham 2022-02-21 21:26:38 UTC
OK, some more questions:
1. Are you focusing the search box by clicking on it?
2. Are you using any non-default focus stealing settings?
3. Are you using a mouse or a touchpad, or a more exotic input device such as a stylus or your finger on a touchscreen?
4. Are you using the standard Breeze Plasma theme, or another one? If another one, does it still happen with the Breeze Plasma theme?
Comment 4 TYY331 2022-02-21 22:31:51 UTC
(In reply to Nate Graham from comment #3)
> OK, some more questions:
> 1. Are you focusing the search box by clicking on it?
> 2. Are you using any non-default focus stealing settings?
> 3. Are you using a mouse or a touchpad, or a more exotic input device such
> as a stylus or your finger on a touchscreen?
> 4. Are you using the standard Breeze Plasma theme, or another one? If
> another one, does it still happen with the Breeze Plasma theme?

1. The searchbox can be focused by typing or clicking, then using the arrow keys moves the list view.
2. I'm using the default focus setting
3. Mouse.
4. Standard.
I even tried to use a live USB with KDE Neon to test the bug and it was fully reproducible.
Maybe it's because of my hardware, I'm using an Optimus laptop.
Comment 5 Nate Graham 2022-02-21 22:35:31 UTC
(In reply to TYY331 from comment #4)
> 1. The searchbox can be focused by typing or clicking, then using the arrow
> keys moves the list view.
Wait, I'm confused now. I thought the bug you were experiencing was that using the arrow keys did *not* move the list view after you focused the search box.
Comment 6 TYY331 2022-02-21 22:55:47 UTC
(In reply to Nate Graham from comment #5)
> (In reply to TYY331 from comment #4)
> > 1. The searchbox can be focused by typing or clicking, then using the arrow
> > keys moves the list view.
> Wait, I'm confused now. I thought the bug you were experiencing was that
> using the arrow keys did *not* move the list view after you focused the
> search box.

It moves the list view, that's the issue since it's supposed to select and move the list items, not the list view, that results in not being able to keyboard select anything from the clipboard history.

for example suppose you have 2 entries that have the word "def" in them, you activate the clipboard widget, type "def" on the keyboard, then the list filters the 2 items, then if you want to select one of the two elements you should use the up/down arrow key to actually select the item you want, right know the up/down key just move the view but don't interact with the items.
Comment 7 Nate Graham 2022-02-21 23:00:52 UTC
Let's make sure we're talking about the same thing here.

What the up and down arrow keys are supposed to do is move the selection effect between items in the list view. I gather this is working, then? If so, what *exactly* are you trying to do that's not working?

In your example, you would use the up and down arrow keys to select an item from the filtered list, then you would use the return or enter key to move it to the top so that it will be pasted the next time you Ctrl+V to paste text.
Comment 8 TYY331 2022-02-21 23:09:22 UTC
(In reply to Nate Graham from comment #7)
> Let's make sure we're talking about the same thing here.
> 
> What the up and down arrow keys are supposed to do is move the selection
> effect between items in the list view. I gather this is working, then? If
> so, what *exactly* are you trying to do that's not working?
> 
> In your example, you would use the up and down arrow keys to select an item
> from the filtered list, then you would use the return or enter key to move
> it to the top so that it will be pasted the next time you Ctrl+V to paste
> text.

Yes, they are supposed to do just that, in fact that's how it works in previous versions of Plasma
Comment 9 Fushan Wen 2022-02-22 06:45:42 UTC
Git commit 9e0baec1dfaf81d4a4d3346d28a3f8ff0d56329b by Fushan Wen.
Committed on 22/02/2022 at 06:45.
Pushed by fusionfuture into branch 'Plasma/5.24'.

applets/clipboard: Make Up/Down arrow keys work in ClipboardPage

ListView will absorb the key events, so `Keys.onPressed` in
ClipboardPage will not receive the event. Instead we should connect
those key events to `arrowKeyPressed()`.
Related: bug 448811
FIXED-IN: 5.24.2


(cherry picked from commit 95a267d582ba041bbc245b7a22adc7af42e3ffa3)

M  +40   -24   applets/clipboard/contents/ui/ClipboardPage.qml

https://invent.kde.org/plasma/plasma-workspace/commit/9e0baec1dfaf81d4a4d3346d28a3f8ff0d56329b
Comment 10 Fushan Wen 2022-02-22 06:55:15 UTC
(In reply to TYY331 from comment #8)
> (In reply to Nate Graham from comment #7)
> > Let's make sure we're talking about the same thing here.
> > 
> > What the up and down arrow keys are supposed to do is move the selection
> > effect between items in the list view. I gather this is working, then? If
> > so, what *exactly* are you trying to do that's not working?
> > 
> > In your example, you would use the up and down arrow keys to select an item
> > from the filtered list, then you would use the return or enter key to move
> > it to the top so that it will be pasted the next time you Ctrl+V to paste
> > text.
> 
> Yes, they are supposed to do just that, in fact that's how it works in
> previous versions of Plasma

The bugfix commit was cherry-picked to nowhere before (there was a record in bugzilla but no commit in the Plasma/5.24 branch). Now the keyboard navigation should work.