Bug 430062 - New key-held options need to default to repeat for backward compatibility
Summary: New key-held options need to default to repeat for backward compatibility
Status: RESOLVED DUPLICATE of bug 418175
Alias: None
Product: plasma-integration
Classification: Plasma
Component: character alternatives palette (show other bugs)
Version: master
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Janet Blackquill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-06 08:44 UTC by Duncan
Modified: 2020-12-19 18:12 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 Duncan 2020-12-06 08:44:08 UTC
On live-git the new key-held option needs a default other than do-nothing.

Repeat is certainly my preferred option (en-US where accents are commonly viewed as "those funny foreign things"), but show-accented/similar may be preferable in some locales and at least would make obvious that the behavior changed, not simply broke, hopefully prompting people to go look for the setting if they want the old repeat behavior, as I did.

Alternatively, an auto-update to port the old config to the new would be helpful.

Additionally, at least on wayland which I'm running by default now, changing the option in the kcm doesn't take effect immediately.  I had to quit kde/plasma back to the CLI prompt (no *DM, I run a kde starter script from a CLI login) and restart it to get the new setting to take effect.  That may be acceptable for some things, but IMO not so much for keyboard settings like repeat.

Otherwise this thing's going to be a bug generator for sure!
Comment 1 Nate Graham 2020-12-07 16:17:14 UTC
I'm afraid I'm a bit confused here. Can you clarify what the exact bug is, and not report multiple issues or propose a solution?
Comment 2 Duncan 2020-12-07 20:19:14 UTC
(In reply to Nate Graham from comment #1)
> Can you clarify

Thanks for asking.

After my update and a plasma restart, key repeat was, from what I could see, simply broken -- keys no longer repeated.  There was no indication what had changed; the key-repeat that had worked fine before now simply didn't.  

Eventually I found out that was because the new keyboard kcm settings had defaulted to do-nothing for key-hold-down, and I was able to switch it back to the repeat I had before.  But changing the setting didn't seem to do anything, repeat was still broken.  I only got repeat back after I set it *and* then restarted plasma.

Expectation:  If a user had key-repeat set before, as I did, that setting should be retained thru the upgrade.  And if a user changes the repeat setting in the kcm the change should take effect immediately, not require a plasma restart to take effect.

Clearer?  Do I need to split the doesn't-take-effect-immediately to a separate bug?
Comment 3 Nate Graham 2020-12-07 20:27:19 UTC
So when you went to the keyboard KCM, the "Do nothing" radio button was checked?
Comment 4 Duncan 2020-12-08 08:04:16 UTC
(In reply to Nate Graham from comment #3)
> So when you went to the keyboard KCM, the "Do nothing" radio button was
> checked?

Yes.
Comment 5 Nate Graham 2020-12-08 15:29:25 UTC
That's weird. Does pressing the "Defaults" button in the Keyboard KCM reset it to "Do nothing? It doesn't do that for me.
Comment 6 Duncan 2020-12-08 19:04:32 UTC
(In reply to Nate Graham from comment #5)
> That's weird. Does pressing the "Defaults" button in the Keyboard KCM reset
> it to "Do nothing? It doesn't do that for me.

Defaults button changes it to accented/similar.

BTW, I don't believe I specified on this bug yet, I'm on wayland by default now.  If you want me to test on xorg I can, but I now default to wayland and all tests so far are on wayland.

Meanwhile, after the defaults button switched me to accented/similar, I decided to try it.  But holding some letters like a and e that I know have variants... didn't show any variants, as I expected.  Instead, the keys repeated.  But I had it on repeat previously and remembered I had to restart kde/plasma for a change, so I did that... and I /still/ got repeat, not variants.

So I decided to try do-nothing again, since I knew what it did, and sure enough, while I did have to restart plasma again for it to take effect, it did switch to do-nothing.

Switching a few more times (and restarting plasma each time) to double-check the tests, do-nothing does what it says on the label -- nothing.  Repeat does what it says on the label -- repeat.  But show-accented/similar just does repeat as well, only the repeat delay and rate sliders aren't there to adjust the repeat as they are in actual repeat mode.

(Again, this is on wayland.)

Finally, while I'm upgraded now on my working copy, I do have a backup from a few days before the switch to the new-style keyboard-kcm.  If it's helpful, I can logout of my normal user and move my working homedir to a new backup, then copy the old pre-keyboard-kcm-upgrade homedir from that backup, and log back in as my normal user and start plasma to repeat the keyboard-kcum upgrade and see if it again switches to do-nothing, or if that was a one-time thing perhaps due to the order in which the components upgraded or something.  And/or I can test the upgrade on xorg and see if the results are different than on wayland.
Comment 7 Weng Xuetian 2020-12-18 06:26:05 UTC
So your behavior, if on X11, is probably due to this bug (I don't know how that config is applied on wayland, probably kwin is involved.): 
https://bugs.kde.org/show_bug.cgi?id=418175
The bug is when you apply rate config from kcm, it doesn't read the new value, which I just fixed.

Also, the accent option, would rely on QT_IM_MODULE set to plasmaim, which probably doesn't set on your desktop. Due to the fact that it may break normal input method usage, it won't gonna be set by default or being override by your desktop setings. And right now when it is not set to plasmaim, accent and repeat will basically have the same behavior.

I'll probably send patch to hide the key-held if QT_IM_MODULE is not plasmaim.
Comment 8 Duncan 2020-12-18 13:59:28 UTC
(In reply to Weng Xuetian from comment #7)
> So your behavior, if on X11, is probably due to this bug (I don't know how
> that config is applied on wayland, probably kwin is involved.): 
> https://bugs.kde.org/show_bug.cgi?id=418175
> The bug is when you apply rate config from kcm, it doesn't read the new
> value, which I just fixed.

I was on wayland, but that makes total sense.  Thank you.  (I'm temporarily stuck on X ATM due to bug #430501.)

> Also, the accent option, would rely on QT_IM_MODULE set to plasmaim, which
> probably doesn't set on your desktop. Due to the fact that it may break
> normal input method usage, it won't gonna be set by default or being
> override by your desktop setings. And right now when it is not set to
> plasmaim, accent and repeat will basically have the same behavior.

That makes sense as well, and in fact, being en_US and on gentoo where compile-time-options usually translate to user-settable USE flags, if it's compile-time-optional there's a very good chance I don't have that module at all.

> I'll probably send patch to hide the key-held if QT_IM_MODULE is not
> plasmaim.

Should reduce confusion.  Thanks again.

All this likely makes this bug a dupe of bug #418175.  After updating today I'll test a bit more.  Trouble is if #430051 isn't fixed I won't be able to test on wayland again until it's fixed too and I get back on wayland...  But then I can probably close this as a dupe of that one.  Others may be able to do so sooner.
Comment 9 Nate Graham 2020-12-18 19:37:25 UTC
Yep seems like a dupe of Bug 418175.

*** This bug has been marked as a duplicate of bug 418175 ***
Comment 10 Weng Xuetian 2020-12-19 18:12:20 UTC
Git commit 6b7040f3ea2e02c7ca805278fe7fe06ff31b0ec7 by Xuetian Weng, on behalf of Weng Xuetian.
Committed on 19/12/2020 at 18:11.
Pushed by xuetianweng into branch 'master'.

Hide accent option if it is not supported

M  +14   -1    kcms/keyboard/kcmmisc.cpp
M  +38   -25   kcms/keyboard/kcmmiscwidget.ui

https://invent.kde.org/plasma/plasma-desktop/commit/6b7040f3ea2e02c7ca805278fe7fe06ff31b0ec7