diff --git a/comfortable_swipe/gesture/mouse_hold_gesture.cpp b/comfortable_swipe/gesture/mouse_hold_gesture.cpp index d44b7ba..4e58580 100644 --- a/comfortable_swipe/gesture/mouse_hold_gesture.cpp +++ b/comfortable_swipe/gesture/mouse_hold_gesture.cpp @@ -63,7 +63,7 @@ namespace comfortable_swipe::gesture { // eg. MOUSE DOWN hold3 mouse1 std::printf("MOUSE DOWN hold%d %s\n", this->fingers, mouseinput); - if (button != 0) + if (1 <= button && button <= 3) { // send mouse down on associated button xdo_mouse_down(this->xdo, CURRENTWINDOW, button); @@ -81,7 +81,7 @@ namespace comfortable_swipe::gesture if (button != -1) { std::printf("MOUSE UP hold%d %s\n", this->fingers, mouseinput); - if (button != 0) + if (1 <= button && button <= 3) { // send mouse up on associated button xdo_mouse_up(this->xdo, CURRENTWINDOW, button); diff --git a/defaults.conf b/defaults.conf index bf5ee7a..3df55d4 100644 --- a/defaults.conf +++ b/defaults.conf @@ -64,6 +64,7 @@ threshold = 0.0 ############################# # Experimental: MOUSE HOLD # ############################# + # (1: left click, 2: middle click, 3: right click, 4: wheel up, 5: wheel down) # Uncomment to hold a mouse button on 3/4 fingers