Skip to content

Commit

Permalink
Added mouse click sounds. Only linux supported for now
Browse files Browse the repository at this point in the history
  • Loading branch information
zevv committed Mar 31, 2019
1 parent 41322c5 commit 88c34e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scan-x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ int scan(int verbose)
}

rr->device_events.first = KeyPress;
rr->device_events.last = KeyRelease;
rr->device_events.last = ButtonReleaseMask;
rcs = XRecordAllClients;

rc = XRecordCreateContext (dpy, 0, &rcs, 1, &rr, 1);
Expand Down Expand Up @@ -76,6 +76,12 @@ void key_pressed_cb(XPointer arg, XRecordInterceptData *d)
case KeyRelease:
play(key, 0);
break;
case ButtonPress:
play(0xff, 1);
break;
case ButtonRelease:
play(0xff, 0);
break;
default:
break;
}
Expand Down
Binary file added wav/ff-0.wav
Binary file not shown.
Binary file added wav/ff-1.wav
Binary file not shown.

0 comments on commit 88c34e5

Please sign in to comment.