[SOLVED] mplayer, xF86 media keys

Hi,
mplayer is my software of choice for playing music. That's what I would like to do with it: bind some of the xF86 keys to move to the next/previous music -- instead of going to the terminal where mplayer is originally running and use the keys < / > to move between tracks.
However, after some search, I couldn't find a script/command that I could bind to the xF86 keys that allows me to do this. Is there such a command I could use?
Thanks!!
p.s.: since xmonad is my windows manager, I'm using the xmonad configuration file to bind my media keys.
Last edited by falsum (2010-05-08 09:20:48)

Create a pipe
mkfifo mplayer.pipe
start mplayer like so
mplayer -slave -input file=mplayer.pipe
now you can send commands to this fifo, for example:
echo "pt_step 1" > mplayer.pipe
echo "pt_step -1" > mplayer.pipe
for next song/previous song.
Edit: Gah, beaten by snakebite. The dangers of multi-tasking. Oh well...
Last edited by Gusar (2010-03-27 10:52:12)

Similar Messages

  • [Solved] After update, media keys not recognized.

    After I updated today, my play, stop, forward and back keys work, but not recognized in xbindkeys -mk. My vol up, down and mute do not work and are not recognized. I also cannot ctrl+alt+backspace to restart x.
    Last edited by haxit (2009-05-02 15:26:49)

    Acecero wrote:
    haxit wrote:I also cannot ctrl+alt+backspace to restart x.
    Add this
    Option "DontZap" "false"
    to the "ServerFlags" Section in the xorg.conf file.
    Zapping has been disabled by default with xorg-server 1.6
    Thanks a lot.

  • Sony VGN-FW53GF Laptop media keys

    Hi All,
    I am trying to get the media keys (Play/Stop/Fwd/Rev) going on my Sony.
    I found that there is a "sony-laptop" module available to trap ACPI events.
    I did a "modprobe sony-laptop debug=1" with the following results shown by dmesg:
    sony-laptop: Sony Notebook Control Driver v0.6.
    sony-laptop: method: name: _INI, args 0
    sony-laptop: method: name: PWAK, args 0
    sony-laptop: method: name: GWDP, args 0
    sony-laptop: method: name: GSNE, args 1
    sony-laptop: method: name: SSNE, args 1
    sony-laptop: method: name: CSXB, args 1
    sony-laptop: method: name: SODV, args 1
    sony-laptop: method: name: GDDI, args 0
    sony-laptop: method: name: STCS, args 1
    sony-laptop: method: name: RBMF, args 1
    sony-laptop: method: name: RSBI, args 1
    sony-laptop: method: name: CBMF, args 1
    sony-laptop: method: name: EAWK, args 1
    sony-laptop: method: name: SN00, args 1
    sony-laptop: method: name: SN01, args 0
    sony-laptop: method: name: SN02, args 1
    sony-laptop: method: name: SN03, args 1
    sony-laptop: method: name: SN04, args 0
    sony-laptop: method: name: SN05, args 1
    sony-laptop: method: name: SN06, args 1
    sony-laptop: method: name: SNCM, args 0
    sony-laptop: method: name: SN07, args 1
    sony-laptop: method: name: SNF0, args 1
    sony-laptop: method: name: SNF1, args 1
    sony-laptop: method: name: SNF2, args 1
    sony-laptop: method: name: SNF3, args 1
    sony-laptop: method: name: SNF4, args 1
    sony-laptop: method: name: SNF5, args 1
    sony-laptop: method: name: SNF6, args 1
    sony-laptop: method: name: SNF7, args 1
    sony-laptop: method: name: SNF8, args 1
    sony-laptop: method: name: SNF9, args 1
    sony-laptop: method: name: SNFA, args 1
    sony-laptop: method: name: SNFB, args 1
    sony-laptop: method: name: SNFC, args 1
    sony-laptop: method: name: SNFD, args 1
    sony-laptop: method: name: SNFE, args 1
    sony-laptop: method: name: SNFF, args 1
    sony-laptop: method: name: SNAV, args 0
    sony-laptop: method: name: SNGN, args 1
    sony-laptop: Doing SNC setup
    input: Sony Vaio Keys as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/SNY5001:00/input/input13
    input: Sony Vaio Jogdial as /devices/virtual/input/input14
    sony-laptop: brightness ignored, must be controlled by ACPI video driver
    What I don't understand is how to use this information. The /devices.... do not exist.
    On this laptop I also have an S1 and AV MODE key and volume keys.
    The volume keys work out of the box. The S1 key prints out:
    sony-laptop: sony_nc_notify, event: 0x20
    sony-laptop: sony_nc_notify, event: 0x38
    and the AV MODE key prints:
    sony-laptop: Unknown event: 0x100 0xa1
    sony-laptop: sony_nc_notify, event: 0xa1
    sony-laptop: Unknown event: 0x100 0x21
    sony-laptop: sony_nc_notify, event:
    0x21
    The media keys print nothing ....
    Any ideas?

    The media keys don't have acpi events, they are regular xf86-media keys that you can assign normally like on any multimedia keyboard. You only need the standard sony-laptop module enabled (which you already have), the Z-version won't help as it only contains extra information for z-specific hardware like dual-graphics and hsdpa module etc.
    wiki entries:
    http://wiki.archlinux.org/index.php/Extra_Keyboard_Keys
    http://wiki.archlinux.org/index.php/Ext … ys_in_Xorg
    gentoo wiki:
    http://en.gentoo-wiki.com/wiki/Multimedia_Keys
    Last edited by litemotiv (2010-01-21 22:10:56)

  • Media Keys

    When I installed Windows 7 RC for the first time the media keys worked.
    When I rebooted, they no longer work.
    How do I solve this?

    Thank you guys for your help. However i have done both power down function and reinstalled the value added package. The media keys i'm talking about are on the left side of the keyboard under the power button. There is the Eco, Mute, movie, play/pause, reverse fast forward and fast forward and volume up and down. The power button lights up, the caps button lights up, the satellite word lights up on bottom left and above the touchpad and below the spacebar that lights up. I just can't use those keys. They use to work and I thought I had to do some checking in a box but I've gone throught the toshipa HS setup and my Bios is V3.10 11/30/09. I'm running windows 7 service pack 1 64 bit.
    This has happend to me before when I had to do a sytem restore but I can't find or remember how to get them to work again. Also people have said use the function key and held down but I can't find anything that talkes about making those buttons work and light up.
    Thanks,
    Christopher

  • Laughing sound, media keys funny, and black select boxes

    I've only had my macbook for 2 weeks and its gone weird today. It starts with a black select box around icons, popup windows, and the task bar. Then i try to listen to the new mac holiday add when i hear weird laughing. Then the laughing starts when i click on something, anything. I try to turn down the volume with the media key (F12) then dashboard comes in. The contrast keys dont work, and F11 makes firefox browser move to the top right of the screen out of view.
    HELP ME i am in mac ****.

    Hi Doug,
    Thank you for your help. I have done some more problem solving and I found something strange in the activity monitor. So i 'quit the process' and shut down. Its all fixed now.
    Thanks again, Merry Christmas

  • Media key is not working

    Hello
    Recently, the volume buttons, pause/play, fast forward and rewind media keys only work when I am on the Now Playing screen whereas they were working on every other screen in the past; even when my phone was locked. I don't know why it's suddenly not working, can someone please help me to get them to work again? I have done the battery pull out thing and it hasn't helped and whenever I switch on my phone it tells me there was a problem with the key presses and it's really getting to me now because I love music nd totally love my phone . PLEASE HELP
    Thanks

    Hello dvsh, 
    Sorry to hear about  your issue. 
    In this case we can try to reload the software on the BlackBerry® smartphone to make sure it is running the latest version and there are no issues with the OS.
    Here is how to backup your BlackBerry smartphone http://bbry.lv/oPVWXc
    Once you have backed up your BlackBerry smartphone please follow the link below to complete a clean reload of the BlackBerry smartphone software.
    Link: http://www.blackberry.com/btsc/KB03621
    Once completed test it and proceed with a selective restore, here is how to restore http://bbry.lv/qgQxLo
    Thank you
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • ITunes 10.4.1.10 Did Not Fix Media Keys

    Upgrading iTunes to 10.4 disabled my media keys. iTunes 10.4.1 claimed it fixed the media keys however, 10.4.1 did not!
    I have the logitech illuminated keyboard and iTunes 10.4.1
    My old setpoint driver 4.80 can control iTunes only when iTunes is in focus, not when it is minimized.
    The most recent setpoint driver 6.30 cannot control iTunes in focus or minimized.
    (No, I do not want to install "itunescontrol" to solve a problem that did not exist before 10.4)
    The question is: Apple, can you please release a package that allows me to upgrade to 10.3 without a hassle?

    EUREKA!
    Some searching yielded a fix that works for me:
    Open C:\Program Files\Logitech\SetPointP\players.ini
    Find the line under the [Players] section that starts with iTunes
    Your current line should look something like:
    iTunes=wac,iTunes.exe,iTunes,xxx,xxx,xxx,xxx,xxx,xxx,xxx,0,1,iTunes
    You want to replace it with the following (just change the highlighted text):
    iTunes=wac,iTunes.exe,ITWindow,xxx,xxx,xxx,xxx,xxx,xxx,xxx,0,1,iTunes
    Save players.ini
    Restart SetPoint (if it’s in your taskbar, you can right click the icon and click exit.. then launch “SetPoint.exe” in the same directory you found players.ini in)
    Looks like I won't be returning my ipod afterall haha

  • Media Keys not working

    For some reason my media keys (play/pause/fwd/rwd) on my aluminiu keyboard have stopped working.
    When I first got the keyboad they didn't work... I installed KeyboardSoftware1.2 and they started working.
    But, I'm not sure when or how, they have stopepd working again.
    All the other keys (Expose, Brightness etc) work fine.
    I have tried reinstalling 10.5.8 combo, repairing permissions, booting in safe mode, repairing disc (from instal dvd), installing and uninstalling sizlingkeys (this allowed me to apply custom settings to other keys, but not to the media keys)....nothing helped!
    I can't reinstall the KeyboardSoftware update... as it thinks itis already installed... I tried to bypass it with Pacifist, and this caused a right mess (http://discussions.apple.com/thread.jspa?threadID=2360985&stqc=true) which I still haven't sorted either.
    Any ideas??
    Cheers

    Well...
    I took the plunge and did a full Archive & Instal (without copying my files/settings over).
    This solved both the Media/Play keys issues... and the weird Save dialogue issue.
    http://discussions.apple.com/thread.jspa?threadID=2360985&tstart=0
    However, I consider this as a work around, as I never really found out what caused the issues in the first place!
    Oh well....
    The only reason I held off doing the Archive and Install in the first place is because it is quite time consuming, especially with a heavily customised Library folders... and I just didn't want to go through the hassle of reinstalling everything!
    Hmmm... at least it is sorted.
    I guess I should probably get a new graphics card as well due to that error that showed...?

  • Mapping media keys to xfce4-mixer

    I tried to search and find someway to link my media keys on XPS M1330 to my xfce4-mixer. My keyboard is setup as evdev, running xev shows my keys are already set to XF86Audio(something). I even tried to map xmodmap and it didn't help. Anyone know if it is possible to map keys to control xfce4-mixer?

    Maybe, I don't know. I have solved it using another software that comes with ALSA. (The result is the same, it will show up in xfce4-mixer too)
    Menu -> Settings -> Keybord --> Application Shortcut Tab
    Button Add
      Command: amixer -c 0 sset Master 5+
      Command shortcut: *Press your Vol+ key*
    Button Add
      Command: amixer -c 0 sset Master 5-
      Command shortcut: *Press your Vol- key*
    Button Add
      Command: amixer -c 0 sset Master toggle
      Command shortcut: *Press your Mute key*

  • N81 Media key Problem

    i recently updated my n81 8gb to v20.10
    and my media key is not working
    tried restoring factory settings and formatting mass memory
    also tried removing the battery
    no avail and still not working>
    any idea?

    Hard format your mobile. For that, backup your mobile's contacts, messages, notes, calender and bookmarks via Nokia PC Suite backup utility. Don't backup anything else like settings or user files etc. Now backup your images, videos and music files using Windows Explorer. Now format your memory card and switch off your mobile. Now press and hold this 3 key "green call key, * and 3" together and switch on your mobile. Press and hold down that 3 button till country insertion dialogue appear. Now restore all your backup using PC Suite and explorer. This will solve your problem. If your problem is still not solved then now there is may be hardware problem. So go to nearest Nokia Care Point and give them your mobile for proper check.
    If you like my post then give me "Kudos" star...

  • Media keys to sensitive

    I have an issue with the media keys of my laptop. With an own map they're recognized by the gnome shortcut manager and i can assign the volume up and down button, but they react way to sensitive. When i press it once the computer acts like i pressed them for seconds (compared to when i use another key as shortcut vor volume up or down) also the mute button causes toggling for seconds. Has anyone an idea how to fix this?

    Maybe, I don't know. I have solved it using another software that comes with ALSA. (The result is the same, it will show up in xfce4-mixer too)
    Menu -> Settings -> Keybord --> Application Shortcut Tab
    Button Add
      Command: amixer -c 0 sset Master 5+
      Command shortcut: *Press your Vol+ key*
    Button Add
      Command: amixer -c 0 sset Master 5-
      Command shortcut: *Press your Vol- key*
    Button Add
      Command: amixer -c 0 sset Master toggle
      Command shortcut: *Press your Mute key*

  • Media keys in xp

    I have a Toshiba Satellite L305-5921  with XP Media Center Edition installed. Is there a driver for the media keys for xp or do they just work on vista
    Solved!
    Go to Solution.

    Satellite L305-S5921 
    a driver for the media keys for xp
    This one should activate those keys.
       Toshiba Controls for Windows XP 
    -Jerry

  • Media keys won't turn off when computer shuts down

    I've been experiencing a problem with the media keys on my P305-S8834 laptop running vista 64.  The computer will shut down completely, but the media key lights remain on.  They will go off when I start and shut down the computer a couple of times.  This problem is recent.  Up to about two weeks ago the shutdown was normal.  Appreciate any help with this.
    Solved!
    Go to Solution.

    Satellite P305D-S8834
    Media key problems like that are sometimes solved by resetting the motherboard.
    With the battery and AC adapter removed, close the Power switch for 30 seconds.
    Re-attach those, press the Power button to turn the computer on, and then immediately press the F2 key while the Toshiba logo is displayed. Press F9 to restore the BIOS default settings, press F10, and then select Yes (Exit Saving Changes). The computer will restart.
    -Jerry

  • Media Keys Not Working - Apple Wireless Keyboard - Snow Leopard 10.6

    Hello, I am a new user to this Support Area and i tried calling but as its Christmas Day i cant get through because there closed so i decided to join here.
    Ok basically my problem is that i have a iMac and i recently installed Snow Leopard and on Christmas Day i got a Wireless Apple Keyboard i set it up all went well and got through all the bluetooth process fine except when i went to try use the Media Keys which are Brightness Up/Down, Volume Control, Play/Pause/FastForward and the other two don't know what there called tho when i press any of them they dont work when i press F12 which has a picture of Volume Up it goes to my Widgets thing and when i press F11 which is Volume Down it moves all the current apps out of the desktop like a clearing space function.
    I Really would like to have the Media Keys back to how there supposed to be i don't know why it is doing this but i think its Snow Leopard.I Have tried everything possible in System Prefs even removed the keyboard from the Bluetooth paired devices and re paired it but still nothing. It would be mostly appreciated if one you guys could help me soon..
    Thanks Sean

    Wow! I am in the exact same situation. I don't think it is Snow Leopard tho b/c when I plug my old keyboard back in the media keys work fine. It might have to do with the apple aluminum keyboard 2.0 update but when I try to download that it says my system is unable to support it (eben tho it only requires at least 10.5.8).
    If you find a solution let me know.

  • Media keys no longer work

    Description
    My media keys used to work to play, pause, skip forward/backward, etc. in Spotify, and other applications when Spotify is running. Suddenly, my media keys have no effect.
    A more detailed description, using numbered steps
    1. Open Spotify
    2. Start playing music
    3. Click my "Play/Pause" media key
    What I expected to happen
    Music pauses, and resumes upon another click
    What actually happened
    Nothing
    My Operating System
    Windows 7 (64 bit) AND Windows 8.1 (64 bit)
    Do you have a Service Pack installed?
    Windows 7 is Service Pack 1, Windows 8.1 has no Service Pack
    My Spotify version
    0.9.10.14.g578d350b
    My internet provider and country
    Service Electric, USA
    Did you do a clean install of your current Windows version or did you upgrade from a previous version?
    Clean installs on both
    My username
    snyderxc
    Do you have any screenshots you can attach to more clearly explain your issue?
    No

    I don't have google music neither, my problem started after the first time running Windows Media Player in Windows 8.1, and after that every time I press the media keys it opens WMP.
    I already desactivated WMP from the control panel but it doesn't work the media keys for now...
    Also I saw a video that in Win 7 they go to msconfig and unselect the service from there but I don't find it in Win 8.1
    Any other guess???

Maybe you are looking for