Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!bu.edu!bucsf.bu.edu!harryk From: harryk@bucsf.bu.edu (Harry Karayiannis) Newsgroups: comp.sys.atari.st.tech Subject: Re: Getting ASCII value from scancode Message-ID: <80354@bu.edu.bu.edu> Date: 27 Apr 91 07:41:42 GMT References: <1991Apr26.232519.12216@zip.eecs.umich.edu> Sender: news@bu.edu.bu.edu Reply-To: harryk@bucsf.bu.edu (Harry Karayiannis) Followup-To: comp.sys.atari.st.tech Distribution: all Organization: Computer Science Department, Boston University, Boston, MA, USA Lines: 40 In article <1991Apr26.232519.12216@zip.eecs.umich.edu> heavy@zip.eecs.umich.edu (Richard Scott Hall) writes: >I am having a problem. It is quite easy to get the scancode >for a key being pressed (by using evnt_keybd/envt_multi), but >it is a little harder if you just want the ASCII value. For >instance: > > it is possible to press any ALT+ sequence in my program. > When I get a keyboard event, I get the keyboard state from > vq_key_s() (i.e. shift/control/alt), but I get the scancode > from evnt_keybd/multi. So i guess what I am asking, is there > anyway to go from scancode to ASCII without having to define > all the values in my program? > >Richard Hall >University of Michigan >-- > >Standard disclaimer: I am not me, I am who you think you are... > so don't blame me. You should use evnt_keybd() which returns an integer. Now, the high-order byte contains the scan code of the key pressed, and the low-order byte contains the ASCII code. =============================================================================== Harry Karayiannis Post: || |# || 15 N.Beacon, #316 |#| ||#| |#| Boston University Allston, MA 02134 |#| ||#| |#| Computer Science Dpt. U.S.A. |##| ||#| |##| _______________________ ||#| ||#| ||#| |INTERnet: //// |||| \\\\ % fortune -o | harryk@bucsf.bu.edu ///// |||| \\\\\ "Hackers do it with |BITnet: ///// ATARI ST \\\\\ fewer instructions" | cscrzcc@buacca.bu.edu =======================================================|_______________________