Bug 482980 - Keyboard repeat does not work
Summary: Keyboard repeat does not work
Status: RESOLVED UPSTREAM
Alias: None
Product: konsole
Classification: Applications
Component: keyboard (show other bugs)
Version: 24.02.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL: https://github.com/ibus/ibus/issues/2610
Keywords: qt6, wayland
Depends on:
Blocks:
 
Reported: 2024-03-09 13:34 UTC by Ivan Stankovic
Modified: 2024-04-26 16:10 UTC (History)
4 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 Ivan Stankovic 2024-03-09 13:34:15 UTC
SUMMARY
It seems that keyboard repeat stopped working in konsole, or, more precisely, it fails to start in many cases.
There are cases where it's possible to trigger a key repeat, but it is unclear how precisely. One thing that I've
noticed is that after switching focus to konsole from another application, it makes it more likely for key repeat
to work, but _only_ for the first time. Subsequent attempts at key repeat do not work.

STEPS TO REPRODUCE
1. Make sure key repeat is enabled in keyboard settings
2. Open konsole
3. Press a key and hold it down

OBSERVED RESULT
Only one character is printed.

EXPECTED RESULT
Same character should be repeatedly output, as long as the key is held down.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Ivan Stankovic 2024-03-11 14:47:16 UTC
This seems not to be konsole-specific; same behaviour can be observed system-wide, e.g. in kate etc.
Comment 2 Nick 2024-03-16 08:48:49 UTC
Hi - I'm unable to duplicate this on my stock Neon installation. Would you mind confirming if this is still an issue and if so try to narrow down any other factors which might be causing it? Otherwise we may need to close this one unless anyone else can duplicate it. Thanks. Nick.
Comment 3 Ivan Stankovic 2024-03-16 10:19:47 UTC
Still an issue, even with 6.0.2. I'm unable to trigger key repeat with regular keys (e.g. 'j', 'k'), but key repeat works fine with keys like 'PageUp', 'Up arrow'.
Comment 4 Ivan Stankovic 2024-03-16 10:24:46 UTC
This is also not a problem with my keyboard since key repeat works fine in the console (ttyX).
Comment 5 Ivan Stankovic 2024-03-16 10:36:50 UTC
Alright, this seems to be due to me using the IBus Wayland virtual keyboard (System Settings -> Keyboard -> Virtual Keyboard).
Once I select "None" virtual keyboard, key repeat works fine.
Comment 6 Nick 2024-03-16 11:55:12 UTC
Thanks for narrowing this down. I'm not sure I can duplicate this as I don't have a touch screen so cannot activate the virtual keyboard. Also on Neon the only virtual keyboard available is Maliit and having enabled this I'm still getting auto repeat OK when using my physical keyboard. Assuming this needs a touchscreen device to duplicate, I'll need someone else to try to verify this one.
Comment 7 Ivan Stankovic 2024-03-16 12:07:20 UTC
You do not need to have a touchscreen device to reproduce this. I for sure don't have one.
Just 

1. install IBus
2. enable IBus Wayland virtual keyboard in system settings
3. add 2 different keyboard layouts in keyboard settings (I'm guessing any two will do)
Comment 8 Nick 2024-03-16 13:43:03 UTC
Hi Ivan. I'm just not finding it obvious how to set-up the ibus keyboard in Neon (not something I've done before). Would be useful if you can either test this on Neon in a VM if possible, or send a list of all the packages you have installed on Arch to get to this failure scenario. Thanks, Nick.
Comment 9 Ivan Stankovic 2024-03-16 14:05:12 UTC
On Arch I think I only needed the ibus and ibus-hangul packages. I assume the virtual keyboard module of KDE system settings then automatically recognized the available input method engine.

These are the IBus processes and their arguments that I have running:

/usr/lib/ibus/ibus-ui-gtk3 --enable-wayland-im --exec-daemon --daemon-args --xim --panel disable
ibus-daemon --xim --panel disable                                                               
/usr/lib/ibus/ibus-dconf                                                                        
/usr/lib/ibus/ibus-extension-gtk3                                                               
/usr/lib/ibus/ibus-x11 --kill-daemon                                                            
/usr/lib/ibus/ibus-portal                                                                       
/usr/lib/ibus/ibus-engine-simple                                                                
/usr/lib/ibus/ibus-engine-hangul --ibus                                                         

And it's all started by kwin_wayland:

 ├─kwin_wayland_wr─┬─kwin_wayland─┬─Xwayland───9*[{Xwayland}]                                           
 │                 │              ├─ibus-ui-gtk3─┬─ibus-daemon─┬─ibus-dconf───4*[{ibus-dconf}]          
 │                 │              │              │             ├─ibus-engine-han───4*[{ibus-engine-han}]
 │                 │              │              │             ├─ibus-engine-sim───3*[{ibus-engine-sim}]
 │                 │              │              │             ├─ibus-extension-───4*[{ibus-extension-}]
 │                 │              │              │             └─3*[{ibus-daemon}]                      
 │                 │              │              └─5*[{ibus-ui-gtk3}]                                   
 │                 │              └─38*[{kwin_wayland}]                                                 
 │                 └─{kwin_wayland_wr}
Comment 10 Nick 2024-03-16 14:53:56 UTC
OK I'm stuck here. I've installed ibus and ibus-hangul via pkcon and rebooted, but when I go to the virtual keyboard settings in Plasma I only see the options for none and maliit.

If you do have a way to duplicate this on Neon and report back with instructions that would help, else hopefully someone else here with more knowledge than I can help move this forward.
Comment 11 ita84aa 2024-03-17 11:20:28 UTC
I have the same issue on my Arch installation; I tried reproducing the issue on KDE Neon live (neon-user-20240314-0716.iso), but couldn't make the Virtual Keyboard appear either. This was a recent change in Ibus (since 1.5.29), so maybe it's not available in Neon yet? I've yet to try the unstable or development live, but how do I check which Ibus version they have in advance?
Comment 12 Ivan Stankovic 2024-03-17 18:54:14 UTC
Seems to be an ibus-wayland issue: https://github.com/ibus/ibus/issues/2610
Comment 13 Nick 2024-03-20 23:26:03 UTC
Shall we close this bug then as not a KDE issue?
Comment 14 Ivan Stankovic 2024-03-21 15:33:51 UTC
Yes, I think we should close this since this is an IBus problem.