endMsg();
}
- synchronized public void writeKeyEvent(int key, boolean down)
+ synchronized public void keyEvent(int keysym, boolean down)
{
startMsg(MsgTypes.msgTypeKeyEvent);
os.writeU8(down?1:0);
os.pad(2);
- os.writeU32(key);
+ os.writeU32(keysym);
endMsg();
}
- synchronized public void writePointerEvent(Point pos, int buttonMask)
+ synchronized public void pointerEvent(Point pos, int buttonMask)
{
Point p = new Point(pos.x,pos.y);
if (p.x < 0) p.x = 0;
public void writeKeyEvent(int keysym, boolean down) {
if (state() != RFBSTATE_NORMAL || shuttingDown)
return;
- writer().writeKeyEvent(keysym, down);
+ writer().keyEvent(keysym, down);
}
public void writeKeyEvent(KeyEvent ev) {
break;
}
- writer().writePointerEvent(new Point(ev.getX(), ev.getY()), buttonMask);
+ writer().pointerEvent(new Point(ev.getX(), ev.getY()), buttonMask);
}
public void writeWheelEvent(MouseWheelEvent ev) {
for (int i = 0; i < Math.abs(clicks); i++) {
x = ev.getX();
y = ev.getY();
- writer().writePointerEvent(new Point(x, y), buttonMask);
+ writer().pointerEvent(new Point(x, y), buttonMask);
buttonMask = 0;
- writer().writePointerEvent(new Point(x, y), buttonMask);
+ writer().pointerEvent(new Point(x, y), buttonMask);
}
}
// a server-side cursor. Ideally we'd like to send the actual pointer
// position, but we can't really tell when the window manager is done
// placing us so we don't have a good time for that.
- cc.writer().writePointerEvent(new Point(w/2, h/2), 0);
+ cc.writer().pointerEvent(new Point(w/2, h/2), 0);
}
// Most efficient format (from Viewport's point of view)