code: function _canvasKeyDown(e) {
          var code = e.keyCode,
              self = e.target,
              stepEditor = self.stepEditor;
  
          if (code >= KeyEvent.DOM_VK_LEFT && code <= KeyEvent.DOM_VK_DOWN) {
              e.preventDefault();
  
              // Arrow keys pressed
              switch (code) {
              case KeyEvent.DOM_VK_LEFT:
                  stepEditor.stepCanvas.stepParams.timing = "start";
                  break;
              case KeyEvent.DOM_VK_UP:
                  // No upper limit
                  stepEditor.stepCanvas.stepParams.count++;
                  break;
              case KeyEvent.DOM_VK_RIGHT:
                  stepEditor.stepCanvas.stepParams.timing = "end";
                  break;
              case KeyEvent.DOM_VK_DOWN:
                  if (stepEditor.stepCanvas.stepParams.count > 1) {
                      stepEditor.stepCanvas.stepParams.count--;
                  }
                  break;
              }
  
              // update step params
              stepEditor._stepParams = stepEditor.stepCanvas.stepParams;
  
              stepEditor._commitTimingFunction();
              stepEditor._updateCanvas();
              return true;
  
          } else if (code === KeyEvent.DOM_VK_ESCAPE) {
              return true;
          }
  
          return false;
      }
docs: Event handlers 
  Handle key down in <canvas> element
  
  @param {Event} e Key down event