Emulate(...) command
This command used to emulate keyboard and mouse events.
Format description
Emulate([_emulation_command_[,_params_]]....)
Several examples:
0=Emulate(key,1)
1=Emulate(mouse,3)
2=Emulate(mousedown,1,mousermove,100,100,mouseup,1)
3=Emulate(keydown,Control_L,key,c,keyup,Control_L)
Emulation command can be the following:
key, _key_ - emulate press and release button _key_ on keyboard
keyup, _key_ - emulate only release of button _key_ on keyboard
keydown, _key_ - emulate only press of button _key_ 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...)
mousedblclick - emulate 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:
3=Emulate(keydown,Control_L,key,c,keyup,Control_L)
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.
Mouse buttons (1-3) are numbered from left to right.