Bug 166471 - global shortcuts don't work until kwin is restarted or shortcut set
Summary: global shortcuts don't work until kwin is restarted or shortcut set
Status: RESOLVED NOT A BUG
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-13 20:36 UTC by Michal Svoboda
Modified: 2009-02-23 02:07 UTC (History)
1 user (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 Michal Svoboda 2008-07-13 20:36:00 UTC
Version:            (using KDE 4.0.83)
Installed from:    Compiled From Sources
Compiler:          gcc version 4.3.1 
OS:                Linux

global shortcuts don't work when kde starts up. the shortcuts are displayed as set to certain key, but they don't work unless explicitly set again (albeit to the same key). running kwin --replace seems to fix the problem too. situation repeats for new sessions.
Comment 1 Troy Unrau 2008-07-13 20:41:20 UTC
I can confirm this bug did exist for some versions of 4.0.x and some early versions of 4.1 betas.  Not sure if it exists for 4.1 final.

In my case, global shortcuts would work after startup, but stop working shortly afterwards, especially if I was mucking around with kwin settings.  Running kwin --replace (or simply toggling desktop effects off then on) would resolve the issue.

I haven't encountered it in trunk as of the 4.1 tagging, so it may be fixed already, or simply takes longer to trigger.

--Troy Unrau
Comment 2 Stephen 2008-07-13 20:43:55 UTC
I can confirm!

Kubuntu KDE 4.1 Beta 2 packages
Comment 3 Michal Svoboda 2008-08-18 16:52:38 UTC
persisting in latest trunk.
Comment 4 Michal Svoboda 2008-12-21 20:27:46 UTC
STILL suffering from this in kde 4.2 beta 2. Is this bug extremely rare? How can I further diagnose this?
Comment 5 Michal Svoboda 2008-12-31 10:37:59 UTC
After some searching, this bug seems to be related to xorg not being able to compile xkeyboard rules. Upon fixing that, shortcuts seem to work.

It's funny though that 'kwin --replace' seems to force things the right way even if they dont work at first.
Comment 6 Michael Jansen 2009-02-17 22:14:02 UTC
Does this problem still exist? If yes please reply here. 


If not just do nothing. If i get no feedback in the next two weeks i will close that bug.

@Michal Svoboda Do you have more information for me what the problem was? I'm the one working on kde's global shortcuts code currently and have more bugs like that. Perhaps they have the same problem.


Thanks Mike
Comment 7 Michal Svoboda 2009-02-18 09:00:28 UTC
The symptoms were partially as I described earlier: no hotkeys until kwin restarted. (This workaround was suggested by some fella on the IRC.) Additionally, switching keyboard layouts didn't work until restarted (by doing some null operation, like check+uncheck something in keyboard layout settings and clicking apply). And I got that log messages in Xorg log... something like unable to compile keyboard rules. I straced the beast to see some real errors, and I saw them, but I was none the wiser.

The problem was that I didn't have xkeyboard-config-1.4. I cleaned the Xorg keyboard rules directory (topdir/share/X11/xkb) which I probably got from earlier versions of X (possibly even R6), and installed that thing. Then all was fine, as they say, I killed multiple bugs with one stone. It was a little confusing (not just to me) that an additional package except the former xkbrules was needed, but this is clearly not a KDE problem.

On the other hand, the X server being able to compile the keyboard rules clearly makes a good prerequisite for keyboard layouts, but I'm not sure on what basis it fixed the hotkeys bug. Also, it's possible that this was just one of the possible reasons of the hotkeys problem, there might have been others which didn't apply for my case, but did apply for other users.

On the KDE note, as I said, I noticed that restarting some components (like the kde keyboard layouts thingy or kwin) did partial victory as it forced things the right way, even if X server didn't initially provide them as such. This might make for a good strategy in the future, ie. don't rely on something being pre-set by X, but instead re-initialize everything. But that's just a guess.
Comment 8 Michael Jansen 2009-02-23 02:07:06 UTC
I will close it as invalid because we changed nothing in kde.