cylon/examples/keyboard/keyboard.litcoffee

14 lines
289 B
Plaintext
Raw Normal View History

2014-02-21 06:08:26 +08:00
# Keyboard
First, let's import Cylon:
Cylon = require '../..'
Cylon.robot
device: { name: 'keyboard', driver: 'keyboard' }
connection: { name: 'keyboard', adaptor: 'keyboard' }
work: (my) ->
my.keyboard.on 'a', (key) ->
console.log "A PRESSED!"
.start()