  | |  | Key Naming 2.0 | Key Naming 2.0 2004-12-15 - By Jens Ayton
Back As has been mentioned in the "Storing keybindings" thread, mapping a virtual key code to a display string can be quite hairy.
Several years ago I wrote a library to do that, and it worked, and it was even used in a major game. But it used KeyTranslate() and didn't handle Unicode layouts.
Since then, its grown to extreme levels of complications, and I've been planning to get around to properly documenting and releasing it.
Now I've cut it down to a simpler subset: http://web.comhem.se/~u13606823/keynaming2.dmg
Given one or more virtual key codes, it will build a suitable CFString. It handles script-based (KCHR) layouts and Unicode (uchr) layouts. Strangeness like remapping keypad numbers or function keys supported. I believe it handles all special keys found on Apple keyboards. Slicing and dicing optional. Not tested with versions of Mac OS prior to 10.2.
-- Jens Ayton
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Do not post admin requests to the list. They will be ignored. Mac-games-dev mailing list (Mac-games-dev@(protected)) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-games-dev/junlu%405341.com
This email sent to junlu@(protected)
Earn $52 per hosting referral at Lunarpages.
|
|
 |