Xfce Forum

Sub domains
 

You are not logged in.

#1 2011-05-29 02:51:09

thebeav
Member
Registered: 2011-05-29
Posts: 2

[Solved] Mapping playback (next, play, etc...) to key codes

Hi everyone. As the subject suggests, I'm looking for some tips on mapping my multimedia keys to playback commands (for Banshee in particular). I have the volume up, down, and mute keys mapped by doing Applications >> Settings >> Keyboard.

I have verified that the multimedia keys are all being recognized by running xev and getting the keycodes. My problem is, I don't know what the actual commands are that I'm supposed to map. I apologize if it is a noob question, but I have searched the wiki, forums, and google but couldn't figure it out. The only thing I found so far (in the faq documentation) says the commands should be like XF86AudioNext, XF86AudioPrev, etc... However, none of these commands do anything when mapped to the keys. I even try to run them in the terminal and get command not found. Is there something else I need installed or do I need to use different commands?

I am running Arch Linux with X and Xfce. Any other info I can give I will be happy to provide.

Thanks in advance!

Offline

#2 2011-05-29 06:40:52

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Mapping playback (next, play, etc...) to key codes

Create the file ~/.Xmodmap and put something like this in there with the correct keycodes from xev:

keycode 121 = XF86AudioMute
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume
keycode 171 = XF86AudioNext
Keycode 172 = XF86AudioPlay
Keycode 173 = XF86AudioPrev
Keycode 174 = XF86AudioStop

Restart X and then you can use them in the keyboard settings to create shortcuts to banshee --next etc.

Offline

#3 2011-05-31 12:39:12

thebeav
Member
Registered: 2011-05-29
Posts: 2

Re: [Solved] Mapping playback (next, play, etc...) to key codes

Thanks a bunch! A google search for banshee --next did the trick. I was able to map the banshee commands using applications >> settings >> keyboard. Just for everyone's benefit, here are the commands I found:

banshee --next
banshee --previous
banshee --toggle-playing
banshee --play
banshee --pause

Thanks again!

Offline

#4 2011-05-31 17:04:49

Nick
Dev
From: ~
Registered: 2005-02-17
Posts: 1,144
Website

Re: [Solved] Mapping playback (next, play, etc...) to key codes

banshee --help will probably list all the possible actions.

Offline

Board footer

Powered by FluxBB