]> Joshua Wise's Git repositories - xvmouse.git/blobdiff - xvmouse.c
Add middle-click with 'p'
[xvmouse.git] / xvmouse.c
index 44e94d90e6c1ca2f6e3f8557891b3f94da0f3a9a..0d83eb69a002c6ba2fc7682aab5a9c6c2a26a3fc 100644 (file)
--- 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
+}
This page took 0.023289 seconds and 4 git commands to generate.