Friday, April 5, 2013

Xte - Keypress simulation

Xte generates fake input using the XTest extension.
The packets is xautomation.
-x display : Send commands to remote X server.
Commands :
key k : press and release
keydown k : press key
keyup k : release key
str string : write string
mouseclick i : press and release i button
mousedown i : press i button
mouseup i : release i button
mousemove x y : move mouse to x y
sleep x : sleep x seconds
Examples :
xte 'key RETURN' <- press and release Enter
xte 'keydown TAB' <- press TAB
xte 'keyup BACKSPACE' <- press Backspace
xte 'str hackforlulz' <- write hackforlulz
xte 'mouseclick 1' <- click with left button
xte 'mousedown 3' <- press with right button
List of useful commands :
Up, Down, Right, Left, Page_up, Page_down, Tab, Delete, Return, Backspace, End, Alt_L, Alt_R, Shift_L, Shift_R

If you have a problem or you need some explanations just write under this post!

1 comment: