This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] KHotkeys still broken in KDE 4.2 RC1?

Tags: None
(comma "," separated)
cyberwizzard
Registered Member
Posts
29
Karma
0
I read somewhere that khotkeys would be fully functional in KDE 4.2 again (for single stroke hotkeys anyway).

I've just installed 4.1.96 and it still won't work. I've set the keyboard layout to my Logitech G15 keyboard and then used the Global Keyboard Shortcuts under Keyboard & Mouse to set the media keys to be send to Amarok and Kmix.

However, pressing the buttons still doesn't do anything.

Note that the keyboard layout is fine: xev shows the media keys being pressed and also assigning them is working fine. Its just that after assigning them they don't do anything...

Am I doing something wrong? Isn't it supposed to work?

I think when the hotkeys were assigned to Meta+C etc it worked, but I wonder if it was KHotkeys that did that or if Amarok grabbed those keys itself...


User avatar
sayakb
Administrator
Posts
1973
Karma
12
OS
Works for me here. I am using Kubuntu 8.10
KHotkeys was (maybe) fixed in 4.1.85


User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It works perfectly for me as well. You may wish to check if khotkeys if running ( pidof khotkeys )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
cyberwizzard
Registered Member
Posts
29
Karma
0
bcooksley wrote:It works perfectly for me as well. You may wish to check if khotkeys if running ( pidof khotkeys )


Weird: the control panel shows it as running but I don't get a pid from that command. On a side note, I don't have a khotkeys executable in /usr/kde/4.2/bin - although I'm not sure it is supposed to be there (as it should be a service).

Tried recompiling khotkeys but that didn't make a difference.


User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
They changed the way KHotKeys ran for 4.2, it used to be a seperate daemon. It now runs as part of KDE Daemon, and can be controlled through Service Manager under the advanced tab in System Settings. Try restarting it.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
cyberwizzard
Registered Member
Posts
29
Karma
0
bcooksley wrote:They changed the way KHotKeys ran for 4.2, it used to be a seperate daemon. It now runs as part of KDE Daemon, and can be controlled through Service Manager under the advanced tab in System Settings. Try restarting it.


Thats what I figured :-) I tried that a couple of times. If it does crash or some how has troubles I find it weird that the GUI won't notify me...


User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Is it working for you currently? If it isn't try logging out.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
cyberwizzard
Registered Member
Posts
29
Karma
0
Relogging, recompiling, rebooting, reinstalling - nothing works.

When I switch the buttons to their defaults for Amarok (Meta+letter) it works - when using the Media Keys it does not.

I just noticed something: pressing the button sets the button label "Media Play" while that used to be XF86MediaPlay in KDE3. I hope the labeling is purely cosmetic and does not cause a mismatch when pressing it?


User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
It could be your Keyboard layout. This would explain why the defaults ( Meta + Key ) work but non defaults ( XF86MediaPlay for instance ) do not. Could you try with other Meta + Key combinations to confirm this suspicion?

If it still doesn't work, you might have a damaged "kglobalshortcutsrc" file. I would recommend removing this file outside of your KDE session. It can be found at $KDEHOME/share/config.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
ivan
KDE Developer
Posts
918
Karma
14
OS
One possible solution (aka works for me TM) would be to do this - fire up terminal emulator:
Code: Select all
$ echo '#!/bin/bash' > ~/.kde/Autostart/reloadkhotkeys.sh
$ echo '(sleep 3 && qdbus org.kde.kded /modules/khotkeys reread_configuration) &' >> ~/.kde/Autostart/reloadkhotkeys.sh
$ chmod u+x ~/.kde/Autostart/reloadkhotkeys.sh

you may need to replace .kde with .kde4, depending on your installation.


Image
cyberwizzard
Registered Member
Posts
29
Karma
0
bcooksley wrote:It could be your Keyboard layout. This would explain why the defaults ( Meta + Key ) work but non defaults ( XF86MediaPlay for instance ) do not. Could you try with other Meta + Key combinations to confirm this suspicion?

xev shows this:
Code: Select all
KeyPress event, serial 34, synthetic NO, window 0x1000001,
    root 0x1a5, subw 0x0, time 4261755092, (62,156), root:(67,181),
    state 0x10, keycode 162 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1000001,
    root 0x1a5, subw 0x0, time 4261755172, (62,156), root:(67,181),
    state 0x10, keycode 162 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

So the layout is fine.

bcooksley wrote:If it still doesn't work, you might have a damaged "kglobalshortcutsrc" file. I would recommend removing this file outside of your KDE session. It can be found at $KDEHOME/share/config.


I will now remove the file and relog into the session - if that don't work I will use the reload script :)


cyberwizzard
Registered Member
Posts
29
Karma
0
Removing the kglobalshortcut file suddenly made the volume keys work but the media keys did nothing.

Then I remembered that I had a .Xmodmap in my home folder for years to get the keys to work. When switching layouts, the media keys even triggered when a normal keyboard was selected and the Stop button mapped to Volume Down according to xev.

So I removed the .Xmodmap and voila, the media keys were properly dead (they trigger but don't have the XF86MediaPlay labels) and I set the layout back to the G15 I have and behold it works!

ivan: I tested without your script and it still works so I assume the .Xmodmap screwed me over and I don't need to reload khotkeys after login.

Cheers for the help guys :)


cacycleworks
Registered Member
Posts
3
Karma
0
cyberwizzard wrote:ivan: I tested without your script and it still works so I assume the .Xmodmap screwed me over and I don't need to reload khotkeys after login.


Does this mean that if I can get KDE 4.2 to load on an ubuntu system that khotkeys will work? Or are there other tricks required to make them work? This has been the one issue preventing me from getting on and trying the switch to KDE4.

I recall reading somewhere (while trying to learn why khotkeys stopped) that installing kde4-core on an ubuntu alt install made their machine quite fast.

I do have a *buntu box with the latest updates... here's the info from aptitude:
[size=small][font=Courier]kde-core 5:48ubuntu
Description: the K Desktop Environment core modules
KDE (the K Desktop Environment) is a powerful Open Source graphical desktop environment for Unix workstations. It combines ease of use, contemporary
functionality, and outstanding graphical design with the technological superiority of the Unix operating system.

This metapackage includes the core official modules released with KDE. This includes just the basic desktop (browser, file manager, text editor,
control center, panel, etc.) and important libraries and data.
Homepage: http://www.kde.org
Priority: optional
Section: kde
Maintainer: Ubuntu Core Developers
Compressed size: 8044
Uncompressed size: 41.0k
Source Package: meta-kde
-- Depends (3)
-- kdebase-runtime (>= 4:4.1.1) (UNSATISFIED)
p 4:4.1.2-0ubuntu6
p 4:4.1.3-0ubuntu1~intrepid1
-- kdebase-workspace (>= 4:4.1.1) (UNSATISFIED)
p 4:4.1.2-0ubuntu12
p 4:4.1.3-0ubuntu1~intrepid1
-- kdelibs5 (>= 4:4.1.1) (UNSATISFIED)
p 4:4.1.2-0ubuntu10
p 4:4.1.3-0ubuntu1~intrepid4[/font]

[/size]

Should I wait until I see 4.2.x to show in the repositories before trying to get KDE 4.2?

Thanks!
Chris

Last edited by cacycleworks on Wed Jan 28, 2009 5:39 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I am unsure if KDE 4.2 is being provided as an official update by Ubuntu. You may need to use a 3rd party project ( such as project Neon )


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
jokerwww
Registered Member
Posts
12
Karma
0
I'm having the same problem that was reported here, my multimedia key are recgonized(I can set the shortcuts) but clicking them results in nothing happening.

I too had a .Xmodmap listing XF86AudioPlay, XF86AudioStop, etc. the diference is that for me removing the .Xmodmap and kglobalshortcutsrc and logging out/in again didn't work.

Nothing changed at all, the mute, raise volume and lower volumes keys work for, however the play/pause,stop,next,prev don't work for amarok.

Any one has anymore insights into what the issue may be?

P.S. I'm using KDE 4.2.4/gentoo on a dell inspiron 1520 laptop


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar