bind method

void bind(
  1. T input,
  2. String keyCode, {
  3. bool shift = false,
  4. bool ctrl = false,
  5. bool altOpt = false,
  6. bool meta = false,
})

Bind the given keyboard input to the given logical input.

The given keyCode should be a recognized code from a browser html.KeyboardEvent. See KeyCode for a defined set of codes.

Implementation

void bind(T input, String keyCode,
    {bool shift = false,
    bool ctrl = false,
    bool altOpt = false,
    bool meta = false}) {
  var kb = _KeyBinding(keyCode,
      shift: shift, ctrl: ctrl, altOpt: altOpt, meta: meta);
  _bindings[kb] = input;
}