You can use Quartz Event Servcices .
They provide CGEventCreateKeyboardEventthat allows you to emulate any physical keystroke.
The API is modeled after real-key events.
Therefore, you must call "Shift" + "Character" to receive the letter in upper case. You also need to release the pressed keys.
Apple documentation contains sample code .
Update:
We are talking about Mac OS X, right? Please add some tags to the original question.
source
share