Bug 431923

Summary: Keeping arrow keys pressed does nothing
Product: [Plasma] plasma-integration Reporter: tromzy
Component: character alternatives paletteAssignee: Janet Blackquill <uhhadd>
Status: RESOLVED FIXED    
Severity: normal CC: aacid, arojas, bugs.kde.org.trustful938, flyingwaffle, geisserml, kde, me, nate, plasma-bugs
Priority: VHI Keywords: regression
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.21.2
Sentry Crash Report:

Description tromzy 2021-01-22 09:36:56 UTC
SUMMARY
In Plasma 5.21 beta, I cannot navigate through a list of elements in any application by pressing the arrow keys without releasing my finger. For example, opening a text file in Kate and keeping down pressed would normally make the cursor go all the way down to the end of the file ; here, it goes down one line and stops, as if I pressed down only and released immediately. Same thing for left, right, up. Happens in QT (Dolphin, Konsole, Kate, etc.) and non-Qt applications (Firefox, Eclipse, etc.).

The bug appears on Wayland, I have not tested on X11.

STEPS TO REPRODUCE
1. Open any application.
2. Push an arrow key without releasing it in order to try to navigate.
3. 
OBSERVED RESULT
It goes in the direction only by one step.

EXPECTED RESULT
It should keep moving.

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

ADDITIONAL INFORMATION
Archlinux Kde-unstable repo packages.
Comment 1 Nate Graham 2021-01-22 15:43:56 UTC
Ugh, this must be a regression from the key-held stuff. Arrow keys were supposed to be excluded.

Regardless, the feature will be reverted for Plasma 5.21, but we need to fix this for 5.22.

Jan, can you please take care of this?
Comment 2 Nate Graham 2021-01-26 21:17:43 UTC
*** Bug 431938 has been marked as a duplicate of this bug. ***
Comment 3 Nate Graham 2021-01-28 18:34:00 UTC
The commit has been reverted so this is no longer an issue for Plasma 5.21. We'll make sure it doesn't regress in the future.
Comment 4 tromzy 2021-02-16 16:33:49 UTC
Hmm, the bug still happens in Plasma 5.21 (not beta) on Archlinux.
Comment 5 Nate Graham 2021-02-17 04:20:51 UTC
I think I may understand what happened.

We had an update script that changed people's settings to use a new feature which was stripped out right before the beta, so the update script updated people's settings incorrectly and caused this problem.

Then later we fixed the update script to update people's settings correctly to account for the feature being removed and ensure no regressions. However the automatic system for running update scripts only runs them once. Since we changed the same update script between the beta and the final release, people who were running the beta don't get the update script run again with its correct data when they upgrade from the beta to the final release!

So the good news is that this won't affect anyone upgrading from Plasma 5.20 to 5.21 (i.e. most people).

The bad news is that it will probably affect everyone who tested the beta. Sorry. :(

Jan, any ideas for how we can migrate beta users to the final configuration without asking all of them to manually fix this?
Comment 6 Albert Astals Cid 2021-02-17 16:33:07 UTC
> So the good news is that this won't affect anyone upgrading from Plasma 5.20 to 5.21 (i.e. most people).

That's not correct.

I never tried the beta and it broke my settings.
Comment 7 Antonio Rojas 2021-02-17 17:27:54 UTC
The migration is wrong

https://invent.kde.org/plasma/plasma-desktop/-/blob/master/kcms/keyboard/kcminputrc_migrate_repeat_value.py

KeyboardRepeating was a tri-state in which 0 meant STATE_ON. It's being migrated to "nothing".
Comment 8 Bug Janitor Service 2021-02-17 17:35:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/353
Comment 9 Nate Graham 2021-02-17 18:03:12 UTC
Yikes. Thanks for handling this, folks!
Comment 10 Janet Blackquill 2021-02-17 18:06:39 UTC
Git commit 5550af1fd10dccda80be4586f19e3aa0995be2bc by Jan Blackquill.
Committed on 17/02/2021 at 18:06.
Pushed by cblack into branch 'master'.

kcms/keyboard: fix migration

TriState::STATE_ON is 0, while TriState::STATE_OFF is 1.
We're currently migrating 0 -> disabled, when it should be
1 -> disabled, * -> enabled.
FIXED-IN: 5.21.1

M  +1    -1    kcms/keyboard/kcminputrc_migrate_repeat_value.py

https://invent.kde.org/plasma/plasma-desktop/commit/5550af1fd10dccda80be4586f19e3aa0995be2bc
Comment 11 Janet Blackquill 2021-02-17 18:08:25 UTC
Git commit 64546c81d43f8b10487d9c6c5bb0fab4de457d13 by Jan Blackquill.
Committed on 17/02/2021 at 18:07.
Pushed by cblack into branch 'Plasma/5.21'.

kcms/keyboard: fix migration

TriState::STATE_ON is 0, while TriState::STATE_OFF is 1.
We're currently migrating 0 -> disabled, when it should be
1 -> disabled, * -> enabled.
FIXED-IN: 5.21.1
(cherry picked from commit 5550af1fd10dccda80be4586f19e3aa0995be2bc)

M  +1    -1    kcms/keyboard/kcminputrc_migrate_repeat_value.py

https://invent.kde.org/plasma/plasma-desktop/commit/64546c81d43f8b10487d9c6c5bb0fab4de457d13
Comment 12 Antonio Rojas 2021-02-18 09:36:41 UTC
*** Bug 433147 has been marked as a duplicate of this bug. ***
Comment 13 Thiago Sueto 2021-02-20 19:53:03 UTC
*** Bug 433335 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2021-02-23 17:19:35 UTC
*** Bug 433255 has been marked as a duplicate of this bug. ***
Comment 15 STPR 2021-02-24 00:04:01 UTC
Coming from 433335 (which was marked as duplicate of this bug), the comment by Jan suggests that it was fixed in 5.21.1. Arch repos have the updated packages, and after installing it, the issue still persists. (Just to add: I have never installed the beta packages).
Comment 16 Nils 2021-02-24 08:04:34 UTC
I can confirm here, the bug is not yet fixed.
Comment 17 geisserml 2021-02-24 08:22:36 UTC
I'm not sure whether this is related or not, but also since the update to Plasma 5.21, navigating through texts with ctrl+arrow which should move by words has stopped working. In particular, I liked to use that in Konsole. My input method is set to ibus. Should I open a new issue for that?
Comment 18 Nate Graham 2021-02-24 16:02:51 UTC
Yeah, I'm so sorry. :(

We are hoping to finally finally finally have this fixed in Plasma 5.21.2 with https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/355
Comment 19 Janet Blackquill 2021-02-24 18:21:12 UTC
Git commit b4f3a470e7c477815b1f95f1a8e40bdd1dcf5b83 by Jan Blackquill.
Committed on 24/02/2021 at 18:19.
Pushed by cblack into branch 'master'.

kcms/keyboard: handle botched 5.21.0 migration

Since we shipped a botched migration script for 5.21.0, we need to
ship a new migration script that un-botches the effects of the 5.21.0
script. We also change the ID of the plain kcminput_repeat migration so
that we can distinguish between the botched migration and the non-botched
migration, and only reverse migrations applied by the botched migration.
FIXED-IN: 5.21.2

M  +4    -0    kcms/keyboard/CMakeLists.txt
A  +60   -0    kcms/keyboard/kcminputrc_fix_botched_5_21_0.py
A  +35   -0    kcms/keyboard/kcminputrc_fix_botched_5_21_0.upd
M  +1    -1    kcms/keyboard/kcminputrc_repeat.upd

https://invent.kde.org/plasma/plasma-desktop/commit/b4f3a470e7c477815b1f95f1a8e40bdd1dcf5b83
Comment 20 Janet Blackquill 2021-02-24 18:21:46 UTC
Git commit c03bba6eb40bf12f497f05417ef7ab3d40f7edae by Jan Blackquill.
Committed on 24/02/2021 at 18:21.
Pushed by cblack into branch 'Plasma/5.21'.

kcms/keyboard: handle botched 5.21.0 migration

Since we shipped a botched migration script for 5.21.0, we need to
ship a new migration script that un-botches the effects of the 5.21.0
script. We also change the ID of the plain kcminput_repeat migration so
that we can distinguish between the botched migration and the non-botched
migration, and only reverse migrations applied by the botched migration.
FIXED-IN: 5.21.2
(cherry picked from commit b4f3a470e7c477815b1f95f1a8e40bdd1dcf5b83)

M  +4    -0    kcms/keyboard/CMakeLists.txt
A  +60   -0    kcms/keyboard/kcminputrc_fix_botched_5_21_0.py
A  +35   -0    kcms/keyboard/kcminputrc_fix_botched_5_21_0.upd
M  +1    -1    kcms/keyboard/kcminputrc_repeat.upd

https://invent.kde.org/plasma/plasma-desktop/commit/c03bba6eb40bf12f497f05417ef7ab3d40f7edae