Bug 390110 - Weird behavior when utilizing acentuation
Summary: Weird behavior when utilizing acentuation
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.12.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 391117 392812 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-08 21:53 UTC by Pedro Gabriel Drumond Pereira
Modified: 2018-04-24 14:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
mgraesslin: Wayland+
mgraesslin: X11-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Gabriel Drumond Pereira 2018-02-08 21:53:22 UTC
When I'm trying to insert acentuation (like acute or tilde), plasma opens my browser and opens google.com, or it opens dolphin file manager, or krita, or anything alike that.

It works as it should when I'm in X session.
Comment 1 Martin Flöser 2018-02-09 05:18:16 UTC
Which keyboard layout are you using? Which exact keys are you typing for tilde?
Comment 2 Pedro Gabriel Drumond Pereira 2018-02-09 15:28:59 UTC
I'm using the Português -> Português (Brasil) -> default.  
In my keyboard there are keys for accentuation, the layout is QWERT, accute is next to the 'p' key and the tilde is next to 'ç' that's next to L.
To insert accentuation I press one of those keys and then a letter key. When I press the accentuation keys when on wayland, I have that weird behaviour.
Comment 3 Martin Flöser 2018-02-09 18:58:15 UTC
Does this behavior happen only when plasma has focus or does it happen on any application?
Comment 4 Pedro Gabriel Drumond Pereira 2018-02-09 19:04:34 UTC
It happens anywhere. I can't text anyone withouth open random windows.
Comment 5 Pedro Gabriel Drumond Pereira 2018-02-09 19:05:22 UTC
The behaviour was not new from this version, I opened a bug in my distro in the version 5.11.5, they tried to patch qt to correct it but the behaviour had changed slightly.
Before using ç used to open things too, and if I press the key a lot of times sequentialy in a low interval of time I could insert the key, but the random windows open too, now I can't text the key anymore.
Comment 6 Patrick Silva 2018-02-09 19:17:45 UTC
my report about problem with accents under Wayland.
https://bugs.kde.org/show_bug.cgi?id=379912

Some days ago I asked in Arch Linux tracker to add the QT patch that fixes accentuaton under Wayland. Patch was applied and problem solved in plasma 5.11.5. But after update to plasma 5.12 accentuation stoped working.
On my Arch Linux krunner is opened when I try to type accents.
Comment 7 Martin Flöser 2018-02-09 20:17:57 UTC
I have an idea...

Please go to the Task switcher config module and remove the shortcuts for switching current application. By default that is set to Alt+` and Alt+~ which is on an English keyboard above the Tab key.

Maybe that's what gets triggered.
Comment 8 Pedro Gabriel Drumond Pereira 2018-02-09 20:59:50 UTC
It didn't work.
Comment 9 Martin Flöser 2018-02-10 17:48:38 UTC
I added your keyboard layout yesterday, but I didn't experience the problems. Could you please tell me what's your locale? Especially environment variables LC_ALL, LC_CTYPE and LANG? Those influence the compose table. Maybe that'll allow me to reproduce.
Comment 10 Pedro Gabriel Drumond Pereira 2018-02-11 00:51:21 UTC
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=
Comment 11 Martin Flöser 2018-02-11 08:20:31 UTC
nope, cannot reproduce.

Please use KWin's debug console, go to the input events tab and monitor what happens when you try to use these events. What I'm most interested are key codes, scan codes and the state of the modifiers.

E.g. for krunner to open we either must have the meta modifier pressed, or alt+f2 or alt+space.
Comment 12 Mahendra Tallur 2018-02-12 00:24:08 UTC
Hi ! Here, using an AZERTY keyboard, using the "^" key which is necessary to type for instance an "ê" "â" "î" "ô" "û" in French words, raises the krunner (ALT-F2) menu.

It happens regarless of the focus. I'll give more details ASAP.

(Neon / Plasma 5.12.0)
Comment 13 Mahendra Tallur 2018-02-12 10:01:15 UTC
Regarding my ^ key issue :

1) hitting "^" triggers krunner. It stops triggering krunner when I disable the ALT-F2 shortcut from the control panel

2) the ^ key still doesn't work as expected though. I have to hit it TWICE instead of ONCE to get the accentuated characters.

For instance if I type "^" then "e" I get "e"
If I type "^" then "^" then "e" I get "ê"

IN THE KWIN DEBUG CONSOLE

I noticed the following :

1) if I hit "^" once, it reports the scancode 26 and xkb "" for the first "^". For the second "^" it reports scancode 26 and xkb 94.

2) if I hit "^" once then "e", it reports scancode 26 xkb "" then scancode 18 xkb 234 utf-8 "ê" EVEN IF the character actually displayed is "e" and not "ê" if I hit ^ only once.

PS :
LANG = fr_FR.UTF-8
LC_ALL = 
LC_CTYPE = 
Using KDE Neon, French AZERTY keyboard, Wayland session.
Comment 14 Mahendra Tallur 2018-02-12 10:07:03 UTC
Addentum : as for the characters being actually inserted, it also depends on the toolkit being used.

In Thunderbird / Firefox, hitting the ^ modifier twice makes it work (i.e. 2x"^" + "e" = "ê").
BUT in KWrite / Dolphin, I never get the accentuated chars regardless of the number of times I hit the modifier key (x*"^" + e = "e")
Comment 15 Pedro Gabriel Drumond Pereira 2018-02-16 01:28:00 UTC
When I press tilde the kwin console gives me Xcb symbol 0 at odd and Xcb symbol 126 for even presses, no modifiers for either of then and scan code 40.
When I press accute, Xcb symbols are 0 for odd, 126 for even, no modifiers and scan code 40.
I can now input those keys in text box eventually, but krita opens in process, and if it's already open it makes krita window gain or lose focus.
Comment 16 Martin Flöser 2018-02-26 20:06:23 UTC
*** Bug 391117 has been marked as a duplicate of this bug. ***
Comment 17 Martin Flöser 2018-04-06 18:54:54 UTC
*** Bug 392812 has been marked as a duplicate of this bug. ***
Comment 18 Aleix Pol 2018-04-24 14:24:29 UTC
Git commit 4403e86acc8c4598ef1fbbf27ce2274b9b3ef5c5 by Aleix Pol.
Committed on 24/04/2018 at 14:23.
Pushed by apol into branch 'master'.

Don't try to filter null key combinations

Summary:
When using composite key combinations, kwin would do random weird
actions when the first key was pressed (e.g. ` key). This makes sure we
are not trying to match.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12416

M  +20   -0    autotests/integration/globalshortcuts_test.cpp
M  +3    -0    globalshortcuts.cpp

https://commits.kde.org/kwin/4403e86acc8c4598ef1fbbf27ce2274b9b3ef5c5
Comment 19 David Edmundson 2018-04-24 14:35:44 UTC
Git commit bec8493459d5e15272a4fd07a84b35896b47ce69 by David Edmundson, on behalf of Aleix Pol.
Committed on 24/04/2018 at 14:35.
Pushed by davidedmundson into branch 'Plasma/5.12'.

Don't try to filter null key combinations

Summary:
When using composite key combinations, kwin would do random weird
actions when the first key was pressed (e.g. ` key). This makes sure we
are not trying to match.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D12416

M  +20   -0    autotests/integration/globalshortcuts_test.cpp
M  +3    -0    globalshortcuts.cpp

https://commits.kde.org/kwin/bec8493459d5e15272a4fd07a84b35896b47ce69
Comment 20 Patrick Silva 2018-04-24 14:38:38 UTC
Currently Wayland session is unusable for me because this bug.
Thank you very much for fixing it! \o/