Skip to content

Commit

Permalink
Implement click 4 and click 5 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
jyi2ya authored Dec 23, 2021
1 parent 8ef7a98 commit 46f5144
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/keynavish/commands.d
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ private void click(string button)
inputs[0].mi.dwFlags = MOUSEEVENTF_MIDDLEDOWN;
inputs[1].mi.dwFlags = MOUSEEVENTF_MIDDLEUP;
break;
case "4":
inputs[0].mi.dwFlags = MOUSEEVENTF_WHEEL;
inputs[0].mi.mouseData = WHEEL_DELTA;
inputs[1].mi.dwFlags = 0;
break;
case "5":
inputs[0].mi.dwFlags = MOUSEEVENTF_WHEEL;
inputs[0].mi.mouseData = -WHEEL_DELTA;
inputs[1].mi.dwFlags = 0;
break;
default:
showError("Invalid mouse button: " ~ button);
break;
Expand Down

0 comments on commit 46f5144

Please sign in to comment.