From: Joshua Wise Date: Fri, 20 Jun 2008 19:16:39 +0000 (-0400) Subject: Add middle-click with 'p' X-Git-Url: http://git.joshuawise.com/xvmouse.git/commitdiff_plain/HEAD?hp=2c1bb55db744f80d1cdce172ced413bbf5e9eee5 Add middle-click with 'p' --- diff --git a/xvmouse.c b/xvmouse.c index 44e94d9..0d83eb6 100644 --- a/xvmouse.c +++ b/xvmouse.c @@ -24,7 +24,7 @@ unsigned long long now() return tv.tv_sec*1000000 + tv.tv_usec; } -void main() +int main() { int e; XEvent ev; @@ -80,6 +80,8 @@ void main() XTestFakeButtonEvent(dpy, 1, ev.type == KeyPress, 0); else if (!strcmp(keystr, "o")) XTestFakeButtonEvent(dpy, 3, ev.type == KeyPress, 0); + else if (!strcmp(keystr, "p")) + XTestFakeButtonEvent(dpy, 2, ev.type == KeyPress, 0); else if (!strcmp(keystr, "apostrophe") || !strcmp(keystr, "semicolon")) { if (ev.type == KeyPress) status |= STATUS_TAPJUMP; @@ -153,6 +155,5 @@ void main() XTestFakeRelativeMotionEvent(dpy, 0, 2, 0); } - exit(0); -} \ No newline at end of file +}