title: Convert character to key code in cocoa or carbon
body: <p>How do I convert a character (or one letter NSString) into corresponding key code that would generate it using currently selected keyboard layout with cocoa or carbon?</p>