diff --git a/app/src/main/java/xtr/keymapper/InputEventCodes.java b/app/src/main/java/xtr/keymapper/InputEventCodes.java index 2e5af79a..33660a64 100644 --- a/app/src/main/java/xtr/keymapper/InputEventCodes.java +++ b/app/src/main/java/xtr/keymapper/InputEventCodes.java @@ -6,6 +6,7 @@ public class InputEventCodes { public static final int REL_WHEEL = 8; public static final int BTN_MOUSE = 272; public static final int BTN_RIGHT = 273; + public static final int BTN_MIDDLE = 274; public static final int BTN_SIDE = 275; public static final int BTN_EXTRA = 276; public static final String[] ARROW_KEYS = {"KEY_UP", "KEY_DOWN", "KEY_LEFT", "KEY_RIGHT"}; diff --git a/app/src/main/java/xtr/keymapper/mouse/MouseAimHandler.java b/app/src/main/java/xtr/keymapper/mouse/MouseAimHandler.java index 53752341..382073f2 100644 --- a/app/src/main/java/xtr/keymapper/mouse/MouseAimHandler.java +++ b/app/src/main/java/xtr/keymapper/mouse/MouseAimHandler.java @@ -1,6 +1,7 @@ package xtr.keymapper.mouse; import static xtr.keymapper.InputEventCodes.BTN_EXTRA; +import static xtr.keymapper.InputEventCodes.BTN_MIDDLE; import static xtr.keymapper.InputEventCodes.BTN_MOUSE; import static xtr.keymapper.InputEventCodes.BTN_RIGHT; import static xtr.keymapper.InputEventCodes.BTN_SIDE; @@ -86,6 +87,7 @@ public void handleEvent(int code, int value, OnButtonClickListener listener) { break; case BTN_SIDE: + case BTN_MIDDLE: case BTN_EXTRA: case BTN_RIGHT: listener.onButtonClick(code, value); diff --git a/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java b/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java index 6f61c655..51c469be 100644 --- a/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java +++ b/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java @@ -1,6 +1,7 @@ package xtr.keymapper.touchpointer; import static xtr.keymapper.InputEventCodes.BTN_EXTRA; +import static xtr.keymapper.InputEventCodes.BTN_MIDDLE; import static xtr.keymapper.InputEventCodes.BTN_MOUSE; import static xtr.keymapper.InputEventCodes.BTN_RIGHT; import static xtr.keymapper.InputEventCodes.BTN_SIDE; @@ -137,6 +138,7 @@ private void handleMouseEvent(int code, int value) { case BTN_EXTRA: case BTN_SIDE: + case BTN_MIDDLE: if (value == 1) triggerMouseAim(); case REL_WHEEL: