Bug 349746 - khotkey regression: meta+* not working as expected in QT apps with plasma 5 nor plasma 4
Summary: khotkey regression: meta+* not working as expected in QT apps with plasma 5 n...
Status: RESOLVED DUPLICATE of bug 353781
Alias: None
Product: khotkeys
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Mint (Ubuntu based) Linux
: NOR grave
Target Milestone: ---
Assignee: Michael Jansen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-30 10:13 UTC by gilles Quenot
Modified: 2015-10-14 21:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
image (41.54 KB, image/png)
2015-06-30 16:20 UTC, gilles Quenot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gilles Quenot 2015-06-30 10:13:06 UTC
Since an upgrade, my keyboard shortcuts doesn't work anymore. When I hit Meta+m to type my mail with the command 'xvkbd -text 'foo@bar'", the 'xvkbd' command never send the inputs characters as expected. Instead, I have a bug that switch me to another plasma activity and pop me some random applications (kde 4.14.2, plasma 4.11.11, mint).

If I test this behaviour (same settings) on a daily plasma 5 released live-cd, and if I try the keyboard shortcuts in a 'konsole' terminal, the shell try to complete (like tab pressed) some network devices : http://pix.toile-libre.org/upload/original/1435658627.png

I repeat, this was working as a charm before (don't know when exactly)

Reproducible: Always

Steps to Reproduce:
1. create a new 'custom shortcut', 'Global shortcut, 'via command/URL'
2. install 'xvkbd' and add the command "xvkbd -text 'foo@bar'" in the newly created entry
3. choose meta+m combo

Actual Results:  
random results

Expected Results:  
foo@bar (as if we typed right from the keyboard)
Comment 1 gilles Quenot 2015-06-30 16:20:41 UTC
Created attachment 93432 [details]
image
Comment 2 Olivier van der Toorn 2015-08-01 18:55:21 UTC
The switching of activities is broken too, likely by this bug. 

This is tested under Kubuntu Vidid with Plasma 5.3.2.

Steps to Reproduct:
1. create a new activity (have at least two)
2. hit meta+tab to switch to the next activity

Actual Results:
Nothing happens

Expected Results:
Changing of the activity.
Comment 3 gilles Quenot 2015-09-02 22:23:28 UTC
Migrated to archlinux x86_64 and plasma 5, by example meta + m as simple command URL with the command 

    zenity --info --text 'ok'

doesn't work at all (zenity works as well if the command is launched in a pseudo terminal)

plasmashell 5.4.0

No errors in ~/.xsession-errors
Comment 4 gilles Quenot 2015-09-15 14:37:29 UTC
Meta+A (latin 9 keyboard) pop up the activities window. (it's supposed to be Meta+Q)

Setting a new shortcut with meta+A don't override this.

tested on archlinux / plasma 5 with a new fresh user
Comment 5 gilles Quenot 2015-09-15 19:15:18 UTC
An interesting test is that if you uninstall khotkeys and relogin, meta+a still pop up activities window
Comment 6 Ezio Vergine 2015-10-01 00:31:16 UTC
Same problem here.
Meta+Q doesn't work, Meta+S (stop activity) doesn't work

Plasma 5.4.1
KDE Frameworks 5.14.0
Comment 7 Thomas Lübking 2015-10-12 13:39:10 UTC
(In reply to gilles Quenot from comment #4)
> Meta+A (latin 9 keyboard) pop up the activities window. (it's supposed to be
> Meta+Q)
> 
> Setting a new shortcut with meta+A don't override this.

This sounds as if you've a non-qwerty keyboard (likely azerty? ;-)
Try
   pkill kglobalaccel5; sleep 1; kglobalaccel5 &

do shortcuts work as expected afterwards?
Comment 8 gilles Quenot 2015-10-12 22:28:44 UTC
Yes, I have an azerty keyboard accordingly to the latin 9 keymap as stated earlier.

If I hit meta+a, I get 'éà&(&à&é' (instead of 20151013 with the command 'xvkbd -xsendevent -text "$(date '+%Y%m%d')"') in the konsole5 pseudo-terminal before or after your commands. Same thing with kwrite 15.8.1.

But if I run keyboard shortcuts in firefox 41.0.1 (GTK), all keyboards shortcuts with meta+* works !
Comment 9 Thomas Lübking 2015-10-13 07:37:19 UTC
But that's about how the client is handling the xsendevent input from xvkbd.
So the shortcut by itself is working (it triggers the correct event, just Qt5 handles the synthetic keyboard input different from Qt4 and or gtk+)? 
Your original bug description sounded different, though.
Comment 10 gilles Quenot 2015-10-13 17:08:10 UTC
Changed title. Is it OK ?
Comment 11 Thomas Lübking 2015-10-13 19:06:42 UTC
I meant the first post*, but the "problem" is that this is a bug or incompatibility between xvkbd and Qt5 - neither khotkeys nor kglobalaccel is a problem here (the shortcut is triggered by kglobalaccel and and khotkeys executes the proper command - just the command does not what it's expected to do, depending on the client it's applied to)

Did you try whether this is related to the pressed meta modifier (ie. does it happen with a shortcut that does not require to press the meta key or when calling xvkbd delayed

    sleep 5; xvkbd -xsendevent -text "$(date '+%Y%m%d')"


*  notably this: "Instead, I have a bug that switch me to another plasma activity and pop me some random applications" sounded as if the shortcut wasn't triggered at all but something else was done.
Comment 12 Thomas Lübking 2015-10-14 16:04:53 UTC
Given bug #353781 it seems Qt5 ignores at least the xkey.state flag of sent events, so the bug is in Qt5 for pretty much sure.
Comment 13 Thomas Lübking 2015-10-14 21:14:14 UTC
This has been brought to the Qt mailing list before:
http://lists.qt-project.org/pipermail/interest/2014-June/012718.html

*** This bug has been marked as a duplicate of bug 353781 ***