Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 Last.fm 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.

Update:

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

for x in `xdotool search --class last.fm`
do
    if ( xprop -id $x WM_WINDOW_ROLE | grep menuControls );
    then
            xdotool type --window $x Ctrl-m
            break
    fi
done
share|improve this question
add comment

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
add comment

Your Answer

 
discard

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.