Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ayilm1

macrumors newbie
Original poster
Dec 5, 2010
15
0
I've registered here hoping to receive more answers. Apple discussions proved to be a dead end so here it goes. My question is this. I have created a layout in IB for a virtual keyboard. It contains 5 rows of buttons and I want to assign a global character entry to each button. i.e. When a button is pressed, it outputs a character to any text box within OS X. So far the closest I've come to something that is even remotely related is the use of kVK's (Virtual Keycodes) in the HIToolBox framework (Events.h). Please don't tell me it's not possible because there are a stack of soft keyboards up for download. It's just that none of them appeal to what I want. Thanks in advance.
 

subsonix

macrumors 68040
Feb 2, 2008
3,551
79
It's indeed possible, os x already includes a keyboard viewer that does exactly what you describe. I'm not sure how you would create your own though.
 

jared_kipe

macrumors 68030
Dec 8, 2003
2,967
1
Seattle
I'd suspect that the character viewer uses CGEventPost() or CGEventPostToPSN()

So lookup CGKeyCode's and CGEventRef and CGEventCreateKeyboardEvent()
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.