Skip to content
Snippets Groups Projects

~/.xbindkeysrc for “multimedia keys”

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by mirabilos
    • map physical volume up/down keys to mouse wheel
    • map track play/pause and next keys to what they say, for Firefox MPRIS
    • map track stop and prev keys to volume up and down (ALSA master volume)

    Rationale:

    • the track keys need Fn on a Thinkpad X61, the volume keys don’t so are more natural for mouse wheel emulation (plus I did that first)
    • Fn-↑ is Stop and Fn-← is Prev so Stop raises the volume
    Edited
    xbindkeysrc.txt 714 B
    "xdotool click 4"
      XF86AudioRaiseVolume
    
    "xdotool click 4"
      Control + XF86AudioRaiseVolume
    
    "xdotool click 4"
      Shift + XF86AudioRaiseVolume
    
    "xdotool click 4"
      Alt + XF86AudioRaiseVolume
    
    "xdotool click 5"
      XF86AudioLowerVolume
    
    "xdotool click 5"
      Control + XF86AudioLowerVolume
    
    "xdotool click 5"
      Shift + XF86AudioLowerVolume
    
    "xdotool click 5"
      Alt + XF86AudioLowerVolume
    
    "playerctl -p firefox play-pause"
      XF86AudioPlay
    
    #"playerctl -p firefox previous"
    #  XF86AudioPrev
    #"playerctl -p firefox volume 0.1-"
    #  XF86AudioPrev
    "amixer set Master 1-"
      XF86AudioPrev
    
    "playerctl -p firefox next"
      XF86AudioNext
    
    #"playerctl -p firefox volume 0.1+
    #  XF86AudioStop
    "amixer set Master 1+"
      XF86AudioStop
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment