• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
KeyTranslate and UCKeyTranslate question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: KeyTranslate and UCKeyTranslate question
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: Easier way to call NSBrowser's delegate from browser matrix?
  • Next by Date: NSBox Title Position
  • Previous by thread: Re: Getting file icon in authorised executable
  • Next by thread: Re: KeyTranslate and UCKeyTranslate question
  • Index(es):
    • Date
    • Thread