From da36f1c2308eeb90997b318a77ee2c3fc061142e Mon Sep 17 00:00:00 2001 From: Cory Walker Date: Sat, 22 Jun 2013 19:32:08 -0400 Subject: [PATCH] Added keyboard controls. --- x11_automate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/x11_automate.py b/x11_automate.py index b20cc38..586b2db 100644 --- a/x11_automate.py +++ b/x11_automate.py @@ -96,6 +96,14 @@ def search(**kwargs): def mouse_move(x, y): c = "mousemove %d %d" % (x, y) return run_command(c) + +def type_string(string): + c = "type '%s'" % string + return run_command(c) + +def key(keyname): + c = "key %s" % keyname + return run_command(c) def click(btn): c = "click %d" % btn