diff --git a/examples/keyboard/keyboard.litcoffee b/examples/keyboard/keyboard.litcoffee new file mode 100644 index 0000000..40fe9a5 --- /dev/null +++ b/examples/keyboard/keyboard.litcoffee @@ -0,0 +1,14 @@ +# 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() \ No newline at end of file