xdotool search "Mozilla Firefox" windowactivate --sync key --clearmodifiers ctrl+lIf you need more specific info. for help me, please let me know.
Firefox appers in first plane, but the command to clean my terminal doesnt work.
I don;t know about the webpage examples, but I can explain how to send window
manager shortcut keys.
The window manager shortcut keys must be sent to the window manager's
frame window.
For example, using "xwininfo -children", I can find the parent window
ID, which is the
frame window. I can then send alt+F9 like this, where the ID is the parent:
xdotool key --window 0x1116d86 alt+F9
Using Gnome window manager, this will minimize the target window. WIth
F4 instead of
F9, it will close the window.
Joe Krahn
If you use --window 0 (which is default unless you have done a
search), it'll send a keystroke exactly as if your keyboard had typed
it.
Window of 0 means xdotool will use XTEST which is a normal X extension
that makes input present as a normal keyboard and mouse. If the window
is nonzero, xdotool will send keystrokes specific to that window using
XSendEvent.
This will close the first-found gnome-terminal assuming your window
manager is looking for Alt+F4 to close a window:
xdotool search gnome-terminal windowactivate --sync key --window 0 alt+f4
You can also kill windows, which usually exits the application:
xdotool search gnome-terminal windowkill
-Jordan