QUOTE(waklu @ Aug 23 2013, 11:49 AM)
dangggg
need to replace my magic mouse la like this ahhahahaha
wow, magic mouse so flat, how to play D3X?
without Razer mouse, you need to do this:
1. Use USB Overdrive to map mouse event to key, say Wheel Click to say shift+⌘+z
2. Use QuickSilver and install a Trigger to shift+⌘+z
3. Have the trigger execute Applescript (save it as App)
CODE
do shell script mouseToolsPath & " -rightClickNoRelease"
4. The Applescript will execute a custom MouseTool binary that right click the mouse but didn't up the button
- Add the following code to MouseTools (http://www.hamsoftengineering.com/codeSharing/MouseTools/MouseTools.html)
» Click to show Spoiler - click again to hide... «
CODE
void performRightClickNoRelease() {
// get the current mouse location
CGEventRef mouseEvent = CGEventCreate(NULL);
CGPoint mouseLoc = CGEventGetLocation(mouseEvent);
CFRelease(mouseEvent);
// click right-mouse
CGEventRef clickMouse = CGEventCreateMouseEvent(sourceRef, kCGEventRightMouseDown, mouseLoc, 0);
CGEventPost(tapLocation, clickMouse);
CFRelease(clickMouse);
}
(OK, this is like self documentation if i want to do this again in the future...)