function Keyboard(config, eventBus) {
  var self = this;

  this._config = config = config || {};

  this._eventBus = eventBus;

  this._keydownHandler = this._keydownHandler.bind(this);
  this._keyupHandler = this._keyupHandler.bind(this);

  // properly clean dom registrations
  eventBus.on('diagram.destroy', function() {
    self._fire('destroy');

    self.unbind();
  });

  if (config.bindTo) {
    console.error('unsupported configuration <keyboard.bindTo>', new Error(compatMessage));
  }

  var bind = config && config.bind !== false;

  eventBus.on('canvas.init', function(event) {
    self._target = event.svg;

    if (bind) {
      self.bind();
    }

    self._fire('init');
  });

}
A keyboard abstraction that may be activated and
deactivated by users at will, consuming global key events
and triggering diagram actions.

For keys pressed down, keyboard fires `keyboard.keydown` event.
The event context contains one field which is `KeyboardEvent` event.

The implementation fires the following key events that allow
other components to hook into key handling:

 - keyboard.bind
 - keyboard.unbind
 - keyboard.init
 - keyboard.destroy

All events contain one field which is node.

Specify the initial keyboard binding state via the
`keyboard.bind=true|false` configuration option.

@param {Object} config
@param {boolean} [config.bind]
@param {EventBus} eventBus