function moveFrames(delta, framesOnly) {
    // Find a frame list.
    var frameList = db.getFirstFrameList();
    if (!frameList) {
      return;
    }

    // Find center time.
    var time = viewport.screenToScene(viewport.getScreenWidth() / 2, 0).x;
    time += db.getFirstEventTime();

    // Find the frame at the center of the viewport.
    var hit = frameList.getFrameAtTime(time);
    if (hit) {
      // Frame, move to adjacent intra-frame space or frame.
      if (framesOnly) {
        var newFrame;
        if (delta < 0) {
          newFrame = frameList.getPreviousFrame(hit);
        } else {
          newFrame = frameList.getNextFrame(hit);
        }
        commandManager.execute('goto_frame', this, null, newFrame);
      } else {
        var startTime;
        var endTime;
        if (delta < 0) {
          var otherFrame = frameList.getPreviousFrame(hit);
          startTime = otherFrame ?
              otherFrame.getEndTime() : db.getFirstEventTime();
          endTime = hit.getTime();
        } else {
          var otherFrame = frameList.getNextFrame(hit);
          startTime = hit.getEndTime();
          endTime = otherFrame ?
              otherFrame.getTime() : db.getLastEventTime();
        }
        commandManager.execute('goto_range', this, null, startTime, endTime);
      }
    } else {
      // If in a intra-frame space, move to a frame.
      hit = frameList.getIntraFrameAtTime(time);
      if (hit) {
        var newFrame = delta < 0 ? hit[0] : hit[1];
        commandManager.execute('goto_frame', this, null, newFrame);
      }
    }
  }
Sets up some simple keyboard shortcuts.
@private