When using git with a key that has a passphrase, you are asked the passphrase every time you pull/push. To make this a bit more convenient, add the key to the OSX Keychain.
Store key in OSX Keychain:
ssh-add -K ~/.ssh/my_key
ssh -i ~/.ssh/path_to_key username@server
Creating and Posting a Keyboard Event:
CGEventRef sDown, sUp;
sDown = CGEventCreateKeyboardEvent (
// setting flags with special function.
// Setting it via CGCreateKeyboardEvent
// would work only for the first time it's run
sUp = CGEventCreateKeyboardEvent (
That leaves the door open for applying the same to mouse events:
mouseEvent = CGEventCreateMouseEvent (
CGEventPost(kCGHIDEventTap, mouseEvent );
Magical. Isn’t it.
Of course, in pre-10.6 days it would have looked like that: