public void hold(int mask,int duration) throws InterruptedException {
  controller.mousePress(mask);
  if (duration >= 0) {
    Thread.sleep(duration);
    controller.mouseRelease(mask);
  }
}

public void hold ( int mask , int duration ) throws InterruptedException { controller . mousePress ( mask ) ; if ( duration >= 0 ) { Thread . sleep ( duration ) ; controller . mouseRelease ( mask ) ; } }
hold mouse for certain duration
