diff --git a/res/values/strings.xml b/res/values/strings.xml index 062ed6ce..0ca33e71 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -33,8 +33,10 @@ Move a finger on the screen to move the mouse cursor. Tap for a click, and use two/three fingers for right and middle buttons. Use a long press to drag\'n drop. Set two finger tap action Set three finger tap action + Set touchpad sensitivity mousepad_double_tap_key mousepad_triple_tap_key + mousepad_sensitivity_key Reverse Scrolling Direction mousepad_scroll_direction @@ -44,11 +46,26 @@ right middle + default right middle none + + Slowest + Above Slowest + Default + Above Default + Fastest + + + slowest + aboveSlowest + default + aboveDefault + fastest + Connected devices Available devices Remembered devices diff --git a/res/xml/mousepadplugin_preferences.xml b/res/xml/mousepadplugin_preferences.xml index 9f0c2daf..f5b8f5d6 100644 --- a/res/xml/mousepadplugin_preferences.xml +++ b/res/xml/mousepadplugin_preferences.xml @@ -20,6 +20,16 @@ android:entries="@array/mousepad_tap_entries" android:entryValues="@array/mousepad_tap_values" android:defaultValue="@string/mousepad_triple_default" /> + + + = Build.VERSION_CODES.HONEYCOMB) { final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener() { @@ -190,7 +212,7 @@ public class MousePadActivity extends ActionBarActivity implements GestureDetect Device device = service.getDevice(deviceId); MousePadPlugin mousePadPlugin = device.getPlugin(MousePadPlugin.class); if (mousePadPlugin == null) return; - mousePadPlugin.sendMouseDelta(mCurrentX - mPrevX, mCurrentY - mPrevY); + mousePadPlugin.sendMouseDelta(mCurrentX - mPrevX, mCurrentY - mPrevY, mCurrentSensitivity); mPrevX = mCurrentX; mPrevY = mCurrentY; } diff --git a/src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java b/src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java index f293a4ff..04163801 100644 --- a/src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java +++ b/src/org/kde/kdeconnect/Plugins/MousePadPlugin/MousePadPlugin.java @@ -78,10 +78,12 @@ public class MousePadPlugin extends Plugin { return context.getString(R.string.open_mousepad); } - public void sendMouseDelta(float dx, float dy) { + public void sendMouseDelta(float dx, float dy, float sensitivity) { NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_MOUSEPAD); - np.set("dx", dx); - np.set("dy", dy); + + np.set("dx", dx*sensitivity); + np.set("dy", dy*sensitivity); + device.sendPackage(np); }