From 07a7a2c13797ce2bac118ab3cd9a34e24e0ed8d5 Mon Sep 17 00:00:00 2001 From: xixebombilla Date: Thu, 20 Feb 2014 16:08:26 -0600 Subject: [PATCH] keyboard lit --- examples/keyboard/keyboard.litcoffee | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/keyboard/keyboard.litcoffee 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