Fn+F12 hotkey not working in KDE 4.6.0

Solaris, RedHat, FreeBSD and the like
Post Reply
Message
Author
Brouwer2
Posts: 4
Joined: Mon Sep 26, 2011 7:23 am
Location: New York, New York

Fn+F12 hotkey not working in KDE 4.6.0

#1 Post by Brouwer2 » Mon Sep 26, 2011 11:05 am

Hello,

I am not entirely sure this is a T60 specific issue (except that it is an issue on my T60 :)), but hopefully someone else here has come across this and might be able to give me some pointers.

I have been using Gnome, on openSUSE 11.4, for a while now, and it works without problems on my Thinkpad T60. However, I am not a fan of what I have seen of Gnome 3, and so I thought I would give KDE a try. I installed the KDE(4.6.0) pattern from software management, and now I can log in on to the KDE desktop environment as well as Gnome. A couple of thinkpad specific things don't work however. Some of the thinkpad hotkeys don't work, but not all. In particular the Fn+F12 (hibernate) and the audio controls on the arrows. Pressing these combinations has no result, but the display brightness buttons (Fn+Home, +End), the radio switch, sleep all work. The keyboard is set to IBM Thinkpad R60/T60 etc in keyboard settings. Running xev from console shows KDE recognises the key presses, and even that they are registered as having the function they are intended to.

Here is the xev output for Fn+12:

Code: Select all


KeyPress event, serial 34, synthetic NO, window 0x5e00001,
    root 0x157, subw 0x5e00002, time 8771089, (47,22), root:(49,45),
    state 0x10, keycode 213 (keysym 0x1008ffa7, XF86Suspend), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x5e00001,
    root 0x157, subw 0x5e00002, time 8771089, (47,22), root:(49,45),
    state 0x10, keycode 213 (keysym 0x1008ffa7, XF86Suspend), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

I thought that this might be a keyboard shortcut settings issue. In System Settings -> Shortcuts and Gestrures -> Global Shortcuts the 'KDE Daemon' shortcuts has Hibernate listed with the global shortcut. If I change that setting from the default, and enter Fn+F12 as the 'new' shortcut then the computer will hibernate. However, it does not save this across sessions. After logging out and logging back in the key won't respond again. I have tried setting a different key combination, Ctrl+F12, and again it worked in the session, but the change was not saved. After logging back in it had reset to the unresponsive default.

The audio controls I can probably live without, but the lack of a shortcut for hibernation is not great. I've looked around and it seems like KDE had hotkey issues a while back, but nothing really later than 2009. I've seen the thinkpad wiki articles on changing the hotkey masks, http://www.thinkwiki.org/wiki/How_to_ge ... key_events, but I'm out of my depth there. Any advice or pointers on the matter would be much appreciated.

Thanks in advance.

Brouwer2
Posts: 4
Joined: Mon Sep 26, 2011 7:23 am
Location: New York, New York

Re: Fn+F12 hotkey not working in KDE 4.6.0

#2 Post by Brouwer2 » Tue Sep 27, 2011 7:41 am

I am sorry I posted this in the wrong part of the forum (too little sleep...) :oops: . In checking whether anyone responded I notice I put this in the T40 part, when it should be in the T60 part.

My apologies.

RealBlackStuff
Admin
Admin
Posts: 17490
Joined: Mon Sep 18, 2006 5:17 am
Location: Mt. Cobb, PA USA
Contact:

Re: Fn+F12 hotkey not working in KDE 4.6.0

#3 Post by RealBlackStuff » Tue Sep 27, 2011 9:20 pm

Actually, this should be in the Linux forum...
Lovely day for a Guinness! (The Real Black Stuff)

Check out The Boardroom for Parts, Mods and Other Services.

Brouwer2
Posts: 4
Joined: Mon Sep 26, 2011 7:23 am
Location: New York, New York

Re: Fn+F12 hotkey not working in KDE 4.6.0

#4 Post by Brouwer2 » Wed Sep 28, 2011 7:15 am

Thanks. I'll post there. Sorry for the mixup.

Mike42
Posts: 14
Joined: Mon Sep 12, 2011 4:38 am
Location: Vienna, Austria

Re: Fn+F12 hotkey not working in KDE 4.6.0

#5 Post by Mike42 » Wed Sep 28, 2011 10:22 am

I didn’t even know that there is allready a setting for Hibernate/Suspend shortcuts. Thus I created my own Global Shortcut (Command/URL) which runs the following command:

Code: Select all

qdbus org.freedesktop.PowerManagement /org/freedesktop/PowerManagement Hibernate

Brouwer2
Posts: 4
Joined: Mon Sep 26, 2011 7:23 am
Location: New York, New York

Re: Fn+F12 hotkey not working in KDE 4.6.0

#6 Post by Brouwer2 » Thu Sep 29, 2011 10:30 pm

Cheers, that works nicely!

But, I'm intrigued as to why these shortcuts, the ones for the KDE Daemon, do not get saved. After playing around a little I've found out why Fn+F12 is not recognised. Like the xev output above says the Fn+F12 key is called Suspend, however in the file .kde4/share/config/kglobalshortcutsrc the relevant entry looks like this:

Code: Select all

kded]

Hibernate=Hibernate,Hibernate,Hibernate

The problem seems to be that the shortcut for Hibernation needs to be called `Suspend' rather than 'Hibernate'. Sure enough, if you change the shortcut for Hibernate in System Settings -> Global Keyboard Shortcuts by entering Fn+F12, the line in kglobalshorcutsrc becomes

Code: Select all

kded]

Hibernate=Suspend,Hibernate,Hibernate



and pressing Fn+F12 puts the computer into hibernation. The thing I do not understand is why the change is not preserved across sessions. Log back in and kglobalshortcutsrc goes back to its original state. I've tried editing as root from console outside the KDE session. I even tried deleting the file. When I log back in the file is still there in its original state.

Does anyone have any suggestions as to what might be the problem?

GomJabbar
Moderator
Moderator
Posts: 9765
Joined: Tue Jun 07, 2005 6:57 am

Re: Fn+F12 hotkey not working in KDE 4.6.0

#7 Post by GomJabbar » Sat Oct 01, 2011 4:20 am

One possible solution...

See what the following displays:

Code: Select all

$ xmodmap -pke
If you see an entry with something like keycode 240 = XF86Suspend, notice what the keycode is for it. Then add an entry in /home/~/.Xmodmap. Create .Xmodmap in kwrite if you need to.

Code: Select all

keycode 240 = F30
Log out /log in or Reboot.

Now try setting F30 as your keyboard shortcut for Hibernate.
DKB

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 2 guests