Introducing rubyxmacro

Installation on Debian (Jessie)


Create a display:

require 'rubyxmacro'
d =

Move the mouse:


Click the mouse:

Type a string of keys:

d.sendKeys('Hello World!')

Other methods:

d.mouseDown      #press and hold the mouse button down until mouseUp
d.mouseUp        #release the mouse button
d.rightMouseDown #press and hold the right mouse button down until rightMouseUp
d.rightMouseUp   #release the right mouse button

d.keyPress                      #press a key, only supports letters and numerals
d.keycodePress(keycodeNum)      #press a key based on it's keycode
d.keycodeShiftPress(keycodeNum) #hold down shift, then press key
d.keycodeDown(keycodeNum)       #press and hold down key with the specified keycode
d.keycodeUp(keycodeNum)         #release the key with the specified keycode

Note: I made a minor observation that the method names are in CamelCase which isn't in keeping with the Ruby convention.