diff options
Diffstat (limited to 'asciifarm/client/keymacros.hy')
| -rw-r--r-- | asciifarm/client/keymacros.hy | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/asciifarm/client/keymacros.hy b/asciifarm/client/keymacros.hy new file mode 100644 index 0000000..8b9952e --- /dev/null +++ b/asciifarm/client/keymacros.hy @@ -0,0 +1,15 @@ + +(defmacro send [data] + `(fn [client] (client.send ~data))) + +(defmacro input [action] + `(send ["input" ~action])) + +(defmacro doall [actions] + `(fn [client] (for [action ~actions] (action client)))) + +(defmacro selector [name] + `(.getSelector (.getDisplay client) ~name)) + +(defmacro selectorvalue [name] + `(.getValue (selector ~name))) |
