Skip to content

Instantly share code, notes, and snippets.

@rubyu
Created September 30, 2016 03:44
Show Gist options
  • Save rubyu/f2d6cbfbdb22f133e67d4280a3d09fa7 to your computer and use it in GitHub Desktop.
Save rubyu/f2d6cbfbdb22f133e67d4280a3d09fa7 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CreviceApp.WinAPI.CoreAudio;
using CreviceApp.WinAPI.Window;
using static CreviceApp.WinAPI.Constants.WindowsMessages;
using static CreviceApp.WinAPI.Constants.VirtualKeys;
var convert = false;
var Whenever = @when((ctx) =>
{
return true;
});
Whenever.
@on(RightButton).
@if(LeftButton).
@do((ctx) =>
{
convert = !convert;
Tooltip(string.Format("Wheel2Click {0}", convert ? "enabled" : "disabled"));
});
Whenever.
@if(WheelDown).
@do((ctx) =>
{
if (convert)
{
SendInput.LeftClick();
}
else
{
SendInput.WheelDown();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment