Re: CGEventKeyboardGetUnicodeString + modifier key
Re: CGEventKeyboardGetUnicodeString + modifier key
- Subject: Re: CGEventKeyboardGetUnicodeString + modifier key
- From: Bill <email@hidden>
- Date: Sun, 15 Apr 2007 09:08:30 -0700
On Apr 15, 2007, at 12:18 AM, Andrew Farmer wrote:
On 14 Apr 07, at 23:40, email@hidden wrote:
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?
There's no fixed method; the character that results from a keypress
is based on a big messy lookup process through the user's current
keyboard layout and input method.
The real question is: What exactly are you trying to implement?
There's probably a much better way of going about it.
I have a key logger application that works well except in many
countries outside of the US, where they use special characters;
characters created by two keys: option-character character. For
example, typing option-u u results in ü. Unfortunately my key logger
app does not receive the option-character character typed by the
user. I know what letter they typed, and that they typed the Option
key beforehand, but I don't get the resulting character.
But maybe the answer is in using UCKeyTranslate, as someone else
suggested. I'll take a look.
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