Bug 206859 - Block global shortcuts doesen't work with two keyboards
Summary: Block global shortcuts doesen't work with two keyboards
Status: CONFIRMED
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-09 14:32 UTC by Jan Pogadl
Modified: 2016-08-29 10:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
lshal output (101.37 KB, application/octet-stream)
2009-09-09 14:43 UTC, Jan Pogadl
Details
xev output within KDE 4.3.1 (12.00 KB, application/octet-stream)
2009-09-09 14:53 UTC, Jan Pogadl
Details
xev output within x11 failsave (24.00 KB, application/octet-stream)
2009-09-09 14:59 UTC, Jan Pogadl
Details
patch wich restores the 4.2.4 behaviour (549 bytes, patch)
2009-10-23 22:35 UTC, Jan Pogadl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pogadl 2009-09-09 14:32:09 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Gentoo Packages

Regression, this worked well with KDE 4.2.4.


Description:

The special application/window option to block global shortcuts gets ignored when triggering a combined shortcut (e.g. STRG + F1) and using different keyboards for each keystroke.
If each key of the shortcut is pressed on the same keyboard, the option works as expected, 
the global KDE Shortcut to switch to Desktop 1 gets ignored and the action of the applicaton wich is associated with this key combination is triggered. However pressing each key on a different keyboard the option gets ignored and the global KDE shortcut is triggerd.


Steps to reproduce:

1. Set the option to block global shortcuts for an application (e.g xev) and make sure the application has the focus.
2. press STRG on keyboard 1
3. press F1 on keyboard 2
4. release F1 on keyboard 2
5. press F1 on keyboard 2 again
6. release F1 on keyboard 2
7. release STRG on keyboard 1

Sometimes F1 has to be pressed only once.


Application Information:

kernel: 2.6.31
xorg-server: 1.6.3
evdev: 2.1.3
Comment 1 Jan Pogadl 2009-09-09 14:43:51 UTC
Created attachment 36814 [details]
lshal output
Comment 2 Jan Pogadl 2009-09-09 14:53:38 UTC
Created attachment 36815 [details]
xev output within KDE 4.3.1

xev output when following the reproducing steps within KDE 4.3.1
Comment 3 Jan Pogadl 2009-09-09 14:59:02 UTC
Created attachment 36816 [details]
xev output within x11 failsave
Comment 4 Jan Pogadl 2009-09-09 17:03:42 UTC
oops i ment CTRL instead of STRG
Comment 5 Jan Pogadl 2009-10-23 22:34:41 UTC
ok i got a bit of time to dig into this and as far as it seems in the package '
kdebase/runtime/kglobalaccel' the method 'KGlobalAccelImpl::x11MappingNotify' calls the Method 'GlobalShortcutsRegistry::grabKeys()' which activates all global hotkeys ignoring the "block global shortcuts" settings.

So whenever the xserver casts an mappingnotify event all global hotkeys gets activated.

With the patch below the behaviour as of 4.2.4 is restored. The patch isn't a real fix it just makes KDE useable for me again.
Comment 6 Jan Pogadl 2009-10-23 22:35:52 UTC
Created attachment 37775 [details]
patch wich restores the 4.2.4 behaviour
Comment 7 Thomas Lübking 2012-03-16 22:56:33 UTC
Sorry for the delay.

Is this still an issue?

---
KGlobalAccel needs it's own bugzilla component ;-)
Comment 8 Thomas Lübking 2013-10-12 19:27:37 UTC
"Yes, is" - and as comment #5 figured, it's a problem with kglobalaccel, kwin is not involved.



Actually double press/releasing a global shortcut key on a secondary keyboard breaks global shortcut deactivation - 1st one is caught, second passes
Afterwards the "primary" keyboard (the one that had interacted on the window before) isn't blocked anymore either.
Comment 9 Martin Flöser 2016-08-29 10:28:36 UTC
Reassigning to kglobalaccel