示例#1
0
 public void mouseMoved(int x, int y, MouseEvent event) {
   if (myLastMotionReport != null && myLastMotionReport.equals(new Point(x, y))) {
     return;
   }
   if (shouldSendMouseData(MouseMode.MOUSE_REPORTING_ALL_MOTION)) {
     myTerminalOutput.sendBytes(mouseReport(MouseButtonCodes.RELEASE, x + 1, y + 1));
   }
   myLastMotionReport = new Point(x, y);
 }
示例#2
0
  @Override
  public void mouseDragged(int x, int y, MouseEvent event) {
    if (myLastMotionReport != null && myLastMotionReport.equals(new Point(x, y))) {
      return;
    }
    if (shouldSendMouseData(MouseMode.MOUSE_REPORTING_BUTTON_MOTION)) {
      // when dragging, button is not in "button", but in "modifier"
      int cb = createButtonCode(event);

      if (cb != MouseButtonCodes.NONE) {
        cb |= MouseButtonModifierFlags.MOUSE_BUTTON_MOTION_FLAG;
        cb = applyModifierKeys(event, cb);
        myTerminalOutput.sendBytes(mouseReport(cb, x + 1, y + 1));
      }
    }
    myLastMotionReport = new Point(x, y);
  }
示例#3
0
 public void setY(int y) {
   myCursorCoordinates.y = y;
   cursorChanged();
 }
示例#4
0
 public void setX(int x) {
   myCursorCoordinates.x = x;
   cursorChanged();
 }