Bug 449888

Summary: Virtual Keyboard no longer opens when using a stylus
Product: [Plasma] kwin Reporter: Alex <hartvarab>
Component: virtual-keyboardAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, aleixpol, matthew.adie, nate
Priority: NOR Keywords: regression
Version: 5.24.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.24.1
Sentry Crash Report:
Attachments: coredumpctl output

Description Alex 2022-02-09 20:37:17 UTC
SUMMARY
Since upgrading to 5.24.0 the maliit-keyboard doesn't open up anymore when using a stylus. It still works with touch and used to work with a stylus. This is on a 2-1 convertible laptop.

STEPS TO REPRODUCE
1. Activate virtual keyboard
2. "Click" a text input field with a stylus.

OBSERVED RESULT
Virtual keyboard doesn't open up

EXPECTED RESULT
Virtual keyboard should open up

Additional Information
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5300U CPU @ 2.30GHz
Memory: 3.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500
Lenovo Yoga 12
Comment 1 Nate Graham 2022-02-11 17:28:15 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2022-02-11 18:15:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/2002
Comment 3 Aleix Pol 2022-02-12 02:36:17 UTC
*** Bug 449962 has been marked as a duplicate of this bug. ***
Comment 4 Matthew Adie 2022-02-12 11:34:23 UTC
(In reply to Aleix Pol from comment #3)
> *** Bug 449962 has been marked as a duplicate of this bug. ***

NOTE:  this problem is not limited to the use of a stylus, it extends to touch as well.
Comment 5 Aleix Pol 2022-02-14 01:22:20 UTC
Can you please check with coredumpctl to see that maliit-keyboard isn't crashing for you?

https://github.com/maliit/keyboard/issues/97

I'm seeing it in KDE Neon and archlinux (running master).
Comment 6 Aleix Pol 2022-02-14 01:29:14 UTC
False, it's not happening on archlinux with master (the issue I saw was something else), so you might be seeing the issue in maliit.
Comment 7 Aleix Pol 2022-02-14 01:30:38 UTC
Git commit ad0a35882ef90876caf49f323bfb0791acf20a17 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 14/02/2022 at 00:24.
Pushed by apol into branch 'master'.

inputmethod: Also open the inputm method panel with a pen

M  +10   -5    src/input.cpp
M  +7    -4    src/input.h
M  +3    -4    src/inputmethod.cpp
M  +1    -1    src/keyboard_input.cpp
M  +0    -5    src/keyboard_input.h
M  +11   -11   src/pointer_input.cpp
M  +5    -1    src/tablet_input.cpp
M  +3    -3    src/touch_input.cpp

https://invent.kde.org/plasma/kwin/commit/ad0a35882ef90876caf49f323bfb0791acf20a17
Comment 8 Aleix Pol 2022-02-14 12:27:58 UTC
Git commit 7626dbb1bb4dd5e437f060b3d64da316d15987a6 by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 14/02/2022 at 12:27.
Pushed by apol into branch 'Plasma/5.24'.

inputmethod: Also open the inputm method panel with a pen


(cherry picked from commit ad0a35882ef90876caf49f323bfb0791acf20a17)

M  +10   -5    src/input.cpp
M  +7    -4    src/input.h
M  +3    -4    src/inputmethod.cpp
M  +1    -1    src/keyboard_input.cpp
M  +0    -5    src/keyboard_input.h
M  +11   -11   src/pointer_input.cpp
M  +5    -1    src/tablet_input.cpp
M  +3    -3    src/touch_input.cpp

https://invent.kde.org/plasma/kwin/commit/7626dbb1bb4dd5e437f060b3d64da316d15987a6
Comment 9 Matthew Adie 2022-02-14 14:36:09 UTC
Created attachment 146715 [details]
coredumpctl output

Not sure if you still need it but the output of coredumpctl (attached) didn't show anything.
Comment 10 Matthew Adie 2022-02-14 15:56:14 UTC
Ok I've discovered the following:

If I:

1) enable the virtual keyboard and leave it enabled
2) Log out
3) log in
4) the onscreen keyboard appears like normal

But if I:

1) disable the virtual keyboard 
2) Log out
3) log in
4) enable the virtual keyboard
5) I cannot get the onscreen keyboard to appear

It seems that if Plasma starts with the virtual keyboard already enabled it then works, however if it was disabled when I logout and I only enable it after I login it no longer works.

Matthew
Comment 11 Nate Graham 2022-02-14 18:21:24 UTC
Seems like a separate bug; can you file another bug report for that? Thanks!