Keyboard


The Cylon adaptor for keyboard input.

For more information click here.

How To Connect

Cylon.robot({
  connections: {
    keyboard: { adaptor: 'keyboard' }
  },

  devices: {
    keyboard: { driver: 'keyboard' }
  }
});

How To Use

Example receiving button events from a generic joystick.

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    keyboard: { adaptor: 'keyboard' }
  },

  devices: {
    keyboard: { driver: 'keyboard' }
  }

  work: function(my) {
    my.keyboard.on('a', function(key) {
      console.log("a pressed");
    });
  }
}).start();

Events

a

Emitted when the "a" key is pressed


b

Emitted when the "b" key is pressed


c

Emitted when the "c" key is pressed


d

Emitted when the "d" key is pressed


e

Emitted when the "e" key is pressed


f

Emitted when the "f" key is pressed


g

Emitted when the "g" key is pressed


h

Emitted when the "h" key is pressed


i

Emitted when the "i" key is pressed


j

Emitted when the "j" key is pressed


k

Emitted when the "k" key is pressed


l

Emitted when the "l" key is pressed


m

Emitted when the "m" key is pressed


n

Emitted when the "n" key is pressed


o

Emitted when the "o" key is pressed


p

Emitted when the "p" key is pressed


q

Emitted when the "q" key is pressed


r

Emitted when the "r" key is pressed


s

Emitted when the "s" key is pressed


t

Emitted when the "t" key is pressed


u

Emitted when the "u" key is pressed


v

Emitted when the "v" key is pressed


w

Emitted when the "w" key is pressed


x

Emitted when the "x" key is pressed


y

Emitted when the "y" key is pressed


z

Emitted when the "z" key is pressed


1

Emitted when the "1" key is pressed


2

Emitted when the "2" key is pressed


3

Emitted when the "3" key is pressed


4

Emitted when the "4" key is pressed


5

Emitted when the "5" key is pressed


6

Emitted when the "6" key is pressed


7

Emitted when the "7" key is pressed


8

Emitted when the "8" key is pressed


9

Emitted when the "9" key is pressed


0

Emitted when the "0" key is pressed


f1

Emitted when the "f1" key is pressed


f2

Emitted when the "f2" key is pressed


f3

Emitted when the "f3" key is pressed


f4

Emitted when the "f4" key is pressed


f5

Emitted when the "f5" key is pressed


f6

Emitted when the "f6" key is pressed


f7

Emitted when the "f7" key is pressed


f8

Emitted when the "f8" key is pressed


f9

Emitted when the "f9" key is pressed


f10

Emitted when the "f10" key is pressed


f11

Emitted when the "f11" key is pressed


f12

Emitted when the "f12" key is pressed


space

Emitted when the "space" key is pressed


backspace

Emitted when the "backspace" key is pressed


return

Emitted when the "return" key is pressed


left

Emitted when the "left" key is pressed


Emitted when the "right" key is pressed


up

Emitted when the "up" key is pressed


down

Emitted when the "down" key is pressed


clear

Emitted when the "clear" key is pressed


insert

Emitted when the "insert" key is pressed


delete

Emitted when the "delete" key is pressed


pageup

Emitted when the "pageup" key is pressed


pagedown

Emitted when the "pagedown" key is pressed


home

Emitted when the "home" key is pressed


end

Emitted when the "end" key is pressed


keydown

Emitted when any recognized key is pressed


keyup

Emitted when any recognized key is released


keypress

Emitted when any recognized key is pressed and released

Compatibility