Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
hugs
· 11y ago · 0 comments
I'm sure it's possible, but one way to avoid it -- turn the constant into a method:
> robot.keys.ENTER()
(Not great for key combos, though...)
Comments
[–]
nunull
11y ago
I'd then go with
robot.keys.enter()
(since enter is a function, not a constant) and make it chainable by returning `robot.keys`.
robot.keys.ctrl().enter()
[–]
swsieber
11y ago
You'd probably want something slightly different than keys - at least some way to different between key presses and hold the keys down at the same time.