Safe Haskell | None |
---|---|
Language | Haskell98 |
Test.Robot
Description
The main Robot interface.
Running your robot
Key and button constants
module Test.Robot.Types
Doing things
class Pressable x where Source
Methods
Press a key or button.
release :: x -> Robot () Source
Release a key or button.
hold :: x -> Robot a -> Robot a infixr 4 Source
hold x act
holds down x
while executing act
. It is
equivalent to:
press x >> act >> release x
except hold
ensures that the argument is released in the event
of an exception.
tap :: Pressable x => x -> Robot () Source
Press the argument, then release it.
Note that the underlying events are fired very quickly; much faster
than some applications (such as Xmonad) can handle. If this becomes
an issue, you may introduce a delay using sleep
:
slowTap x = x `hold` sleep 0.1
Miscellaneous
module Test.Robot.Connection