General Mac OS X Discussion General Apple and Mac OS X Discussion

Thread Tools Display Modes
  (#1) Old
aikinai aikinai is offline
Junior Member
Posts: 1
Join Date: Dec 2009
Lightbulb Guide: Remap keys to mouse clicks - 01-13-2010, 09:06 AM

I've found a great application to map keyboard keys to mouse clicks that I wanted to share with everyone. This is particularly useful with the 10v since the left and right clicks are built into the trackpad and it can be especially hard to click and drag.

KeyRemap4MacBook is an open source application that allows you to remap almost all inputs in OS X.

It has a huge number of options to begin with, but it didn't have the remapping I thought was most useful for my Mini, so I added that to the source and built a new package. That package is attached if anyone is interested (Snow Leopard only). The mappings I added are right command to left click and right control to right click. These are under "Remap Command_R Key" and "Remap Control_R Key" in the settings if you would like to use them.

The original author of KeyRemap4MacBook seems to take submissions of new mappings, so I have submitted a patch with the new settings. Hopefully it can be included in the next official release, but you can use my attachment for the time being.

One thing to note is that the right alt and context menu keys are seen as the same input in OS X (At least on my Snow Leopard installation with NetBookInstaller 0.8.3) so with this mapping, both of those keys will become left clicks (they were both command before). If anyone knows how to separate the function of those two keys, I would appreciate information about that.

P.S. I just got my Mini 10v for Christmas and this is my first post at, but it's nice to know there's such a strong community behind using this little machine to its full potential!
Attached Files
File Type: zip (712.0 KB, 54 views)
Reply With Quote
  (#2) Old
w7ox w7ox is offline
Senior Member
w7ox's Avatar
Posts: 449
Join Date: Dec 2009
Default 01-14-2010, 04:49 AM

I installed this tonight. Once I get accustomed to it -- will likely be a good change.

Thanks for making it available.


Netbook: Mini 10v, BIOS A05, OS X 10.6.4, 2 GB RAM, 160 GB HDD, BT
Reply With Quote
  (#3) Old
ehunt123 ehunt123 is offline
Junior Member
Posts: 26
Join Date: Apr 2009
Default 02-04-2010, 06:15 PM

Probabally be better in the dev section, but I did have a gist laying around to do a similar thing via the cli — very handy and easy to tie in elsewhere

caveat: if you are going huh? definitely go with one of the remappers or the many other solutions that can link up events with the mouse/keyboard

Originally acquired from the following location by user Miles:
Quick AppleScript question -- should be easy for you pros. - Forums | MacLife

I have no idea what licensing terms this would be distributed under,
though I figure they're fairly liberal since the code was posted
on a public forum.

to compile:
gcc -o movemouse movemouse.m -framework ApplicationServices -framework Foundation

#include <ApplicationServices/ApplicationServices.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char *argv[])
if (argc == 3) {
char *arg1end, *arg2end;
float x = strtof(argv[1], &arg1end);
float y = strtof(argv[2], &arg2end);
if (!((x == 0.0 && argv[1] == arg1end) || (y == 0.0 && argv[2] == arg2end))) {
CGEventRef ev = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, CGPointMake(x, y), kCGMouseButtonLeft);
CGEventPost(kCGHIDEventTap, ev);
return 0;
printf("usage: %s x y\n", argv[0]);
return 1;
Reply With Quote

click, keyboard, keys, mouse, remap

« donation | Clarification on BIOS/NBI Fix option/method to use an external USB BT adapter »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Copyright © 2008-2016