Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I'd like to be able to bind a global keystroke send a sequence of keystrokes to a specific app.

Specifically: I'm using the client, and I'd like to be able to start/stop music with a global keybinding.

Is there an app that does this? I'm using compiz, if that helps.


I ended up having to write a bash script. Here's the final product: #!/bin/sh

for x in `xdotool search --class`
    if ( xprop -id $x WM_WINDOW_ROLE | grep menuControls );
            xdotool type --window $x Ctrl-m
share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use xdotool that provide a --windows parameter to select the destination window and a search command to look for a window by title, name or other.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.