CGEventKeyboardGetUnicodeString + modifier key
CGEventKeyboardGetUnicodeString + modifier key
- Subject: CGEventKeyboardGetUnicodeString + modifier key
- From: email@hidden
- Date: Sat, 14 Apr 2007 23:40:42 -0700
I'm using the CGEventTapCreate and CGEventKeyboardGetUnicodeString
functions to get the characters typed.
I know when the user presses a modifier key, such as the option key,
and I know what characters are typed. However, even with these
facts, I don't know how to create the special characters formed when
using these two keys.
For example, if the user types option-u and then u, they get ü (not
sure if that letter will show up correctly, but it's a u with two
dots on top of it). CGEventKeyboardGetUnicodeString returns a zero
length string for the option-u, with flags set to show that the
option key was pressed, and then CGEventKeyboardGetUnicodeString
returns a u. Now, how can I programatically make the u into a ü? I
thought I could add a constant number to the ASCII representation,
but that doesn't work in all cases.
My question is, what is the ASCII code for a option-letter if you
know the letter? If u is ASCII decimal 117, how do I get ASCII 159,
which is ü? And so on for other characters?
Thanks!
Bill_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden