Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!psuvax1!psuvm!uh2 From: UH2@psuvm.psu.edu (Lee Sailer) Newsgroups: comp.sys.amiga Subject: Re: How to read the keyboard? Message-ID: <90278.221203UH2@psuvm.psu.edu> Date: 6 Oct 90 02:12:03 GMT References: <2305@gould.doc.ic.ac.uk> Organization: Penn State University Lines: 22 In article <2305@gould.doc.ic.ac.uk>, cpb@doc.ic.ac.uk (C P Brown) says: > >Can anyone tell me the best Intuition-friendly way of saying >"is the z key pressed down at the moment" (or any other key) so that >I can detect whichever keys are being pressed? > I dunno if it is the best way, but you can open the keyboard.device and send it a message. You'll get back a bit pattern that tells you exactly what keys are depressed. I've got a toy ecxample around somewhere. I based it on a chapter from the RKM manual, Libraries and Devices. lee >I'm aiming to do it in Modula-2, but C or assembler or any pointers in >the right direction welcomed. > >Thanks for any help, > >Phil