//Type "Hello World".
robot.typeString("Hello World");
//Press enter.
robot.keyTap("enter");
Whoever designed this interface didn't think much about consistency. //Type "Hello World".
robot.typeString("Hello World");
//Press enter.
robot.keyTap("enter");
Whoever designed this interface didn't think much about consistency. keyboard.type('foo');
keyboard.press('fn');
... makes much more sense. > robot.keys("Type a string")
> robot.keys(ENTER) // ENTER is an integer key value
(I've been thinking about this while trying to make an idiomatic node client for Selenium WebDriver... https://github.com/hugs/34#api) > robot.keys.ENTER()
(Not great for key combos, though...) robot.keys.enter()
(since enter is a function, not a constant) and make it chainable by returning `robot.keys`. robot.keys.ctrl().enter()