Cinder can do anything C++ can do, so it can definitely do this. Normally I would say Cinder could even be a little overkill, but since you’re interfacing with the leap, I think it’s a good fit.
On OSX, the native function you’re going to want to be looking for is
CGEventPost. Here is a basic example of pressing, then releasing the ‘s’ key. You’ll need to make sure the window is focused on Keynote, but Cinder should be happy enough to run in the background.
CGKeyCode inputKeyCode = kVK_ANSI_S;
CGEventSourceRef source = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
CGEventRef keyDown = CGEventCreateKeyboardEvent(source, inputKeyCode, YES);
CGEventRef keyUp = CGEventCreateKeyboardEvent(source, inputKeyCode, NO);
Let us know how it goes!