use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class MousePadPlugin method sendScroll.
public void sendScroll(float dx, float dy) {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("scroll", true);
np.set("dx", dx);
np.set("dy", dy);
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class MousePadPlugin method sendMouseDelta.
public void sendMouseDelta(float dx, float dy) {
NetworkPacket np = device.getAndRemoveUnsentPacket(NetworkPacket.PACKET_REPLACEID_MOUSEMOVE);
if (np == null) {
np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
} else {
dx += np.getInt("dx");
dy += np.getInt("dx");
}
np.set("dx", dx);
np.set("dy", dy);
device.sendPacket(np, NetworkPacket.PACKET_REPLACEID_MOUSEMOVE);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class KeyListenerView method sendChars.
public void sendChars(CharSequence chars) {
final NetworkPacket np = new NetworkPacket(MousePadPlugin.PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("key", chars.toString());
sendKeyPressPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class BigscreenPlugin method sendLeft.
public void sendLeft() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("specialKey", SpecialKeysMap.get(KeyEvent.KEYCODE_DPAD_LEFT));
device.sendPacket(np);
}
use of org.kde.kdeconnect.NetworkPacket in project kdeconnect-android by KDE.
the class BigscreenPlugin method sendDown.
public void sendDown() {
NetworkPacket np = new NetworkPacket(PACKET_TYPE_MOUSEPAD_REQUEST);
np.set("specialKey", SpecialKeysMap.get(KeyEvent.KEYCODE_DPAD_DOWN));
device.sendPacket(np);
}
Aggregations