Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Map key codes to characters



On 21 Feb 08, at 13:57, Nick Zitzmann wrote:
On Feb 21, 2008 AD, at 2:48 PM, Christian Schmitz wrote:
For example giving 12 and want to get a "Q" back and for providing "Q" I
get a 12 back.


Of course it would be nice to know the option keys.

Is that possible?

Currently I use iGetKeys, but that is failing for a lot of cases.

The only one is GetKeys(), but the output from GetKeys() is different on every architecture. Maybe that's what's causing the problem?

GetKeys() works the same on PPC and Intel, so long as you interpret the results correctly. That being said, what it returns to you is literally just a bitmask representing the keys being pressed. If you want to map this into characters, matters get a lot more complicated (particularly if you consider that 'é' is a multi-key composite).


What'd probably work better is if you explain what your goal is. Are you trying to represent a keystroke combination, or are you trying to take text input? The two take rather different approaches._______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Map key codes to characters (From: email@hidden (Christian Schmitz))
 >Re: Map key codes to characters (From: Nick Zitzmann <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.