From 38f747acc45240c2e368689b426278809a224760 Mon Sep 17 00:00:00 2001 From: Joshua Wise Date: Fri, 20 Jun 2008 15:16:39 -0400 Subject: [PATCH] Add middle-click with 'p' --- xvmouse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 +} -- 2.39.2