diff --git a/app/src/main/cpp/mouse_read.c b/app/src/main/cpp/mouse_read.c index e084ce6f..bab65f9a 100644 --- a/app/src/main/cpp/mouse_read.c +++ b/app/src/main/cpp/mouse_read.c @@ -90,6 +90,8 @@ void* send_mouse_events(void* context) { case REL_WHEEL : case BTN_MOUSE : case BTN_RIGHT : + case BTN_EXTRA : + case BTN_SIDE : if (mouse_lock) (*env)->CallVoidMethod(env, pctx->inputServiceObj, mouseEvent, ie.code, ie.value); break; } diff --git a/app/src/main/java/xtr/keymapper/InputEventCodes.java b/app/src/main/java/xtr/keymapper/InputEventCodes.java index e1a687f4..75d222ac 100644 --- a/app/src/main/java/xtr/keymapper/InputEventCodes.java +++ b/app/src/main/java/xtr/keymapper/InputEventCodes.java @@ -6,4 +6,6 @@ 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_SIDE = 275; + public static final int BTN_EXTRA = 276; } diff --git a/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java b/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java index 2cb300ff..c5477b6a 100644 --- a/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java +++ b/app/src/main/java/xtr/keymapper/touchpointer/MouseEventHandler.java @@ -1,7 +1,9 @@ package xtr.keymapper.touchpointer; +import static xtr.keymapper.InputEventCodes.BTN_EXTRA; import static xtr.keymapper.InputEventCodes.BTN_MOUSE; import static xtr.keymapper.InputEventCodes.BTN_RIGHT; +import static xtr.keymapper.InputEventCodes.BTN_SIDE; import static xtr.keymapper.InputEventCodes.REL_WHEEL; import static xtr.keymapper.InputEventCodes.REL_X; import static xtr.keymapper.InputEventCodes.REL_Y; @@ -132,6 +134,10 @@ public void handleEvent(int code, int value) { handleRightClick(value); break; + case BTN_EXTRA: + case BTN_SIDE: + if (value == 1 && mInput.getKeymapConfig().rightClickMouseAim) triggerMouseAim(); + case REL_WHEEL: if (mInput.getKeyEventHandler().ctrlKeyPressed && keymapConfig.ctrlMouseWheelZoom) scrollZoomHandler.onScrollEvent(value, x1, y1);