finger.x = x;
finger.y = y;
if (finger.id != 0) {
- logger.info(String.format("id %d finger multi-touch dragging = (%d, %d)", this.grabFingerID, x, y));
+ //logger.info(String.format("id %d finger multi-touch dragging = (%d, %d)", this.grabFingerID, x, y));
mouseEventData = new MouseEventData(
MouseButtonType.LEFT.value(), MouseEventType.PRESS.value(),
originX, originY, x, y, grabFingerID -1);
MouseButtonType.LEFT.value(), MouseEventType.PRESS.value(),
originX, originY, finger.x, finger.y, i);
communicator.sendToQEMU( SendCommand.SEND_MOUSE_EVENT, mouseEventData );
- logger.info(String.format("id %d finger multi-touch dragging = (%d, %d)", i + 1, finger.x, finger.y));
+ //logger.info(String.format("id %d finger multi-touch dragging = (%d, %d)", i + 1, finger.x, finger.y));
}
try {
Thread.sleep(2);
}
}
else if(SwtUtil.isMacPlatform()) {
- //if(finger.getMaxTouchPoint() > 1) {
- int tempStateMask = stateMask & ~SWT.BUTTON1;
- if(tempStateMask == (SWT.SHIFT | SWT.ALT)) {
+ if(keyCode == SWT.SHIFT || keyCode == SWT.COMMAND) {
+ int tempStateMask = stateMask & ~SWT.BUTTON1;
+ if(tempStateMask == (SWT.SHIFT | SWT.COMMAND)) {
finger.setMultiTouchEnable(1);
logger.info("enable multi-touch = mode1");
}
finger.clearFingerSlot();
logger.info("disable multi-touch");
}
- // }
+ }
}
KeyEventData keyEventData = new KeyEventData(
else if(SwtUtil.isMacPlatform()) {
// if(finger.getMaxTouchPoint() > 1) {
int tempStateMask = stateMask & ~SWT.BUTTON1;
- if((keyCode == SWT.SHIFT && (tempStateMask & SWT.ALT) != 0) ||
- (keyCode == SWT.ALT && (tempStateMask & SWT.SHIFT) != 0))
+ if((keyCode == SWT.SHIFT && (tempStateMask & SWT.COMMAND) != 0) ||
+ (keyCode == SWT.COMMAND && (tempStateMask & SWT.SHIFT) != 0))
{
finger.setMultiTouchEnable(2);
logger.info("enable multi-touch = mode2");
}
- else if(keyCode == SWT.SHIFT || keyCode == SWT.ALT) {
+ else if(keyCode == SWT.SHIFT || keyCode == SWT.COMMAND) {
finger.setMultiTouchEnable(1);
logger.info("enable multi-touch = mode1");
}