KeyTranslate and UCKeyTranslate question
KeyTranslate and UCKeyTranslate question
- Subject: KeyTranslate and UCKeyTranslate question
- From: Amar Sagoo <email@hidden>
- Date: Sun, 5 Dec 2004 17:50:18 +0000
Hi,
My application allows users to specify a hot key for activating it.
This is done using a text field in the Preferences, and my controller
catches keyDown events if that field has the focus, stores the key code
and displays the character(s) represented by the key.
Of course, after the user quits and re-opens the app I also need to
display the the key in the text field (and display the right character
even if they change the keyboard layout in the meantime).
This is why I can't just display the NSEvent's "characters", but
instead use the KeyTranslate and UCKeyTranslate functions to translate
the key code to characters.
However, these functions don't seem to return the right characters for
many keys (e.g. Delete, Enter, the cursor keys and F-keys).
Does anyone know if there is a way around this, apart from hard-coding
those key codes that don't work?
Thanks
Amar
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden