Wouldn’t it be great if you could just press a keyboard combination from any app and your player pauses? Winamp(version 5 onwards) had this feature if you enabled a plugin called Global Hotkeys. You can’t do this in XMMS – but you can set up KHotkeys or Input Action to do it for you.
This is an extremal cool feature of KDE(sorry – no support for Gnome). You can access this feature by opening up Control Panel->Regional & Accessability->Input actions. You could configure it to give some commands to XMMS when you press a shortcut key.
The Examples group already have a XMMS action – next. Follow the format of that example to set the shortcuts for other actions in XMMS. I have 3 action in my system…
- Play/Pause – Ctrl+Alt+Home
- Previous Song – Ctrl+Alt+Page Up
- Next Song – Ctrl+Alt+Page Down
Working of KHotkeys
For this example, I am going to create the Next Song action for XMMS. Click on the New Action Button at the bottom.
First you have to set the action type – the simplest is ‘Keyboard Shortcut->Keyboard Input’. This type simulates a specified key input in a given application when you press the shortcut trigger. For example, when you press ‘Ctrl+Alt+Page Down’ KHotkeys will send the key ‘b’ to XMMS – that is the shortcut in XMMS to go to the next song.
In the next tab, you can set up a shortcut trigger(Say Ctrl+Alt+Page Down).
The ‘Keyboard Input Settings’ tab does all the major work – it decides the key to be send and the application to which the key must be send. In our example, the Keyboard Input is ‘b'(XMMS Shortcut for the next Song).
Next click on New->Simple Window in the Window section. Now open XMMS, click on the ‘Autodetect’, and then click on XMMS. This will populate the fields of the Window popup. We only need the ‘Window Class’ – change the drop down to the ‘Is’ option.
Now click the Apply button.
That’s it – open up XMMS and play any song. If you press Ctrl+Alt+Page Down, XMMS will skip to the next song.
Try doing other things with KHotkeys – it is a powerful tool.
del.icio.us | Digg it | reddit | StumbleUpon
Posted in Applications, Audio, Configuration, KDE | 3 Comments »