Is there a way to convert a unicode character to a Mac virtual keycode? (without building my own table?) It looks like on Windows there is VkKeyScanEx, but I’m not aware of a similar function for Cocoa on OS X.
I’m actually trying to do this for the iPad. I want to convert character taken from the keyboard and convert them into key codes, since the iPad keyboard won’t supply keycodes.
The ShortcutRecorder project on GoogleCode has an
NSValueTransformersubclass for converting strings to keycodes and vice versa, but I’m not sure if it’ll work on iOS. It’s a great place to start looking, though.