Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!kuhub.cc.ukans.edu!2fmlcalls From: 2fmlcalls@kuhub.cc.ukans.edu Newsgroups: comp.sys.mac.programmer Subject: Raw keyCode ==> ASCII? Message-ID: <1991Apr13.165337.29678@kuhub.cc.ukans.edu> Date: 13 Apr 91 16:53:37 CDT Organization: University of Kansas Academic Computing Services Lines: 17 I would like to be able allow the user to reconfigure the keys used to control a game I'm working on. The game uses GetKeys() when the user is playing to see if a key is down. My question is, how can you convert a keyCode into ASCII or a keyDown event into its keyCode? I could special-case every known keyborad type, but this gets real kludgy real fast. (If the user hits the left cursor arrow, I want to allow this as a control - the problem is, I want to display "left arrow" so that they know what key has been assigned.) I tried to use KeyTrans, but there is little explanation of it. To get the pointer to a KCHR I dereferended a call from RGetResource('KCHR',0). I don't know - it seemed to work on my keyboard (didn't work on the extended though). Anyone have experience doing this? Thanks in advance... john calhoun