Emulate(...) command

This command used to emulate keyboard and mouse events.

Format description


Several examples:


Emulation command can be the following:

key, _key_emulate press and release button _key_ on keyboard
key, by_value, _key_value_emulate press and release _key_value_ on keyboard
keyup, _key_emulate only release of button _key_ on keyboard
keyup, by_value, _key_value_emulate only release _key_value_ on keyboard
keydown, _key_emulate only press of button _key_ on keyboard
keydown, by_value, _key_value_emulate only release _key_value_ on keyboard
mouse, _button_emulate press and release of mouse button _button_ (1,2,3...)
mouseup, _button_emulate only release of mouse button _button_ (1,2,3...)
mousedown, _button_emulate only press of mouse button _button_ (1,2,3...)
mousedblclickemulate double click by left mouse button
mousemove,_x_,_y_emulate mouse moving to coordinates (_x_,_y_)
mousermove,_x_,_y_emulate mouse moving form current location by coordinates (_x_,_y_)
sleep,_msec_sleeps _msec_ microseconds before processing next emulation command

In single Emulate(...) command it is possible to use several emulation command:


Symbolic values for keys to emulate could be obtained from /usr/X11/include/X11/keysymdef.h file. It needs to discard XK_ prefix from keysym definition to use it in Emulate(...) command.

In addition to this, it is possible to use the following symbolic values (from /usr/X11/include/X11/XF86keysym.h):

Numeric values for keys to emulate could be obtained from /usr/X11/include/X11/keysymdef.h and /usr/X11/include/X11/XF86keysym.h files. They can be specified in decimal (like 32) or hexadecimal (like 0x00FF) form.

Mouse buttons (1-3) are numbered from left to right.

If You have some problems with handling "Shifted" keys like numbersign(#), please try to use


instead of just