Ubuntu and hotkeys

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Bounty
Emperor's Hand
Posts: 10767
Joined: 2005-01-20 08:33am
Location: Belgium

Ubuntu and hotkeys

Post by Bounty »

Ubuntu has a little app in the repositories that lets you assign functions to unused keyboard hotkeys. I have a basic Logitech keyboard with a few audio control buttons, so in the past I used them to launch the terminal and Thunar and stuff... after wrestling with hotkeys' very temperamental config files.

Unfortunately it's completely dead after the latest upgrade. Is there another easy way to capture input from a USB keyboard and use that to run commands? Or is there some trick to getting hotkeys working that the man page doesn't mention, 'cause all I get now is an error message about my CD drive.
User avatar
Bounty
Emperor's Hand
Posts: 10767
Joined: 2005-01-20 08:33am
Location: Belgium

Re: Ubuntu and hotkeys

Post by Bounty »

But why the hell would you get an error about your cd drive? That doesn't make any sense at all. Try two things for me plz:
The config file has a commented section that searches the CD drive for additional config information (per-keyboard settings). Well, it's commented in the version in my home folder, which should override the one the program dumps god knows where in /usr, but evidently it doesn't.
Run the hotkey program from a terminal and see if it spams error messages to it. If it does, paste them here and we'll see if we can make some sense out of them.

Code: Select all

hotkeys: Unable to open `/dev/cdrom', fall back to /dev/cdrom
After this the program doesn't show up as a process and doesn't, well, work. It does show its splash screen for a split second.
Then, pop open a terminal and run xev. Focus on that window and press your magic keys. See if pressing them causes any output in the terminal. Then control-c it in that terminal when finished.

Code: Select all

KeyPress event, serial 34, synthetic NO, window 0x3200001,
    root 0x74, subw 0x0, time 13562844, (-165,-65), root:(258,226),
    state 0x10, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
They all give the correct commands (stop, pause, play) for the buttons, but not the ones I defined with hotkeys.
Second, save your hotkey config file somewhere and try the default one. Maybe they changed the format somewhere.
Tried that. It doesn't look like it's even reading my config file.

I may give bbkeys a try if it's compatible with Xfce.
User avatar
Bounty
Emperor's Hand
Posts: 10767
Joined: 2005-01-20 08:33am
Location: Belgium

Re: Ubuntu and hotkeys

Post by Bounty »

Minor update-ish thingy:

Turns out Ubuntu now (or at least since sometime before 9.04) has a hotkeys function built in to the keyboard menu. So Hotkeys the program is superfluous and my multimedia keys are once again doing what they are supposed to do.
Post Reply