You are not logged in.

#1 2008-12-29 20:03:38

soupcan
Member
From: ?
Registered: 2008-10-25
Posts: 268

Multimedia key commands.

I have an HP laptop with a few multimedia keys, and I'm currently adding them to my openbox rc.xml. I know the keycodes for all of them, but I don't know what commands they need to run to play/pause, stop, mute, volume up/down, etc. I've done some google searching, and I haven't found the correct commands. I'd be using them with Sonata, if that makes any difference.

Offline

#2 2008-12-29 20:09:26

string
Member
Registered: 2008-11-03
Posts: 286

Re: Multimedia key commands.

Erh.. what do you mean you're "adding them" to your openbox rc.xml? What exactly are you adding?

Offline

#3 2008-12-29 20:09:51

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Multimedia key commands.

I have this in ~/config/openbox/rc.xml to use the multimedia play button to control mpc play/pause:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>

Offline

#4 2008-12-29 20:19:52

soupcan
Member
From: ?
Registered: 2008-10-25
Posts: 268

Re: Multimedia key commands.

skottish wrote:

I have this in ~/config/openbox/rc.xml to use the multimedia play button to control mpc play/pause:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>

@String: I'm adding things like this. The sections for play/pause and stuff weren't there before, so I had to make them.

Skottish, what would I put so that it toggled play/pause in Sonata/MPD? sonata toggle?

Offline

#5 2008-12-29 20:24:06

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Multimedia key commands.

soupcan wrote:
skottish wrote:

I have this in ~/config/openbox/rc.xml to use the multimedia play button to control mpc play/pause:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>

@String: I'm adding things like this. The sections for play/pause and stuff weren't there before, so I had to make them.

Skottish, what would I put so that it toggled play/pause in Sonata/MPD? sonata toggle?

It will pause/play mpd if you have mpc installed. It makes no difference what other client software that you use. I use ario to build playlists, but usually just hit the play/pause button to listen. In fact, this is the whole setup. I didn't post all of them because they are mismatched from what the key normally is:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
    <action name="Execute">
        <execute>mpc next</execute>
    </action>
</keybind>
<keybind key="XF86AudioMute">
    <action name="Execute">
        <execute>mpc stop</execute>
    </action>
</keybind>
<keybind key="XF86AudioLowerVolume">
    <action name="Execute">
        <execute>mpc prev</execute>
    </action>
</keybind>

Offline

#6 2008-12-29 21:04:33

soupcan
Member
From: ?
Registered: 2008-10-25
Posts: 268

Re: Multimedia key commands.

skottish wrote:
soupcan wrote:
skottish wrote:

I have this in ~/config/openbox/rc.xml to use the multimedia play button to control mpc play/pause:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>

@String: I'm adding things like this. The sections for play/pause and stuff weren't there before, so I had to make them.

Skottish, what would I put so that it toggled play/pause in Sonata/MPD? sonata toggle?

It will pause/play mpd if you have mpc installed. It makes no difference what other client software that you use. I use ario to build playlists, but usually just hit the play/pause button to listen. In fact, this is the whole setup. I didn't post all of them because they are mismatched from what the key normally is:

<keybind key="XF86AudioPlay">
    <action name="Execute">
        <execute>mpc toggle</execute>
    </action>
</keybind>
<keybind key="XF86AudioRaiseVolume">
    <action name="Execute">
        <execute>mpc next</execute>
    </action>
</keybind>
<keybind key="XF86AudioMute">
    <action name="Execute">
        <execute>mpc stop</execute>
    </action>
</keybind>
<keybind key="XF86AudioLowerVolume">
    <action name="Execute">
        <execute>mpc prev</execute>
    </action>
</keybind>

Those work for playing/pausing, skip forward/back, and stop. Thanks. Do you have any idea what I would need to set for my mute and volume buttons to work? I'd like them to control system volume, so I'd guess the proper command would something to do with alsa.

Offline

#7 2008-12-29 21:07:31

string
Member
Registered: 2008-11-03
Posts: 286

Re: Multimedia key commands.

OMG the quoting! Anyway, `man amixer` might help.

Offline

#8 2008-12-29 22:22:49

soupcan
Member
From: ?
Registered: 2008-10-25
Posts: 268

Re: Multimedia key commands.

string wrote:

OMG the quoting! Anyway, `man amixer` might help.

I might just be dumb, but I didn't find anything. I'll keep looking.

Offline

#9 2008-12-29 22:36:17

string
Member
Registered: 2008-11-03
Posts: 286

Re: Multimedia key commands.

An example: `amixer set PCM toggle`

Offline

#10 2008-12-30 00:50:56

soupcan
Member
From: ?
Registered: 2008-10-25
Posts: 268

Re: Multimedia key commands.

string wrote:

An example: `amixer set PCM toggle`

That works. Thanks.

Offline

Board footer

Powered by FluxBB