- Posted by Mark Brown <mabrown at SENET.COM.AU> Jun 14, 2000
- 1863 views
------=_NextPart_000_001C_01BFD64F.885E38E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Ferdinand I have always found the performance of Eu's "get_key" a bit lacking. It always seems to hit the performance of whatever I am trying to do. It also seems to buffer up and I couldn't find a way to stop that. (that may be my fault...) Under windows, I found the best solution was to use windows keyboard support. eg. include dll.e -- some constants for keys global constant VK_ESCAPE =3D #1B, VK_LEFT =3D #25, VK_UP =3D #26, VK_RIGHT =3D #27, VK_DOWN =3D #28 atom my_user32_dll my_user32_dll =3D open_dll("user32.dll") -- want this for windows = keyboard input! global constant GetAsyncKeyState =3D = and called something like.... if c_func(GetAsyncKeyState,{VK_LEFT}) then -- -- do stuff here end if if c_func(GetAsyncKeyState,{'Z'}) then -- -- do other stuff here end if I think the fact that you can do this sort of thing in Eu is another advantage it has over QBasic (and Liberty I think) Mark ----- Original Message -----=20 From: =08=08=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Tuesday, June 13, 2000 6:52 This may sound like a stupid question but ...... HOW DA HELL DO YOU = PROGRAM THE KEABORD !!!! I just don`t understand . How do I program the = keabord so that when I press a key the computer know that it is the F = (or any other key ) and then somthing hapens like a bom expodes . In Basic all you = have to do is type INKEY =3D F ( or any other key ) . Please reply . Thanks . Ferdinand Greyling from Terminal Software ------=_NextPart_000_001C_01BFD64F.885E38E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Hi Ferdinand</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>I have always found the performance of Eu's = "get_key" a bit=20 lacking.</FONT></DIV> <DIV><FONT size=3D2>It always seems to hit the performance of whatever I = am trying=20 to</FONT></DIV> <DIV><FONT size=3D2>do. It also seems to buffer up and I couldn't find a = way to=20 stop that.</FONT></DIV> <DIV><FONT size=3D2>(that may be my fault...)</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Under windows, I found the best solution was to use=20 windows</FONT></DIV> <DIV><FONT size=3D2>keyboard support.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>eg.</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>include dll.e</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>-- some constants for keys<BR>global constant = VK_ESCAPE =3D=20 ; =20 VK_LEFT =3D=20 ; =20 VK_UP =3D=20 ; =20 VK_RIGHT =3D=20 ; =20 VK_DOWN =3D #28</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2><BR>atom my_user32_dll</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>my_user32_dll =3D open_dll("user32.dll") -- want = this for=20 windows keyboard input!</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>global constant GetAsyncKeyState =3D=20 IV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT size=3D2>and called something like....</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>if c_func(GetAsyncKeyState,{VK_LEFT}) = then</FONT></DIV> <DIV><FONT size=3D2> --</FONT></DIV> <DIV><FONT size=3D2> -- do stuff here</FONT></DIV> <DIV><FONT size=3D2>end if</FONT></DIV> <DIV><FONT size=3D2></FONT> </DIV> <DIV><FONT size=3D2>if c_func(GetAsyncKeyState,{'Z'}) then</FONT></DIV> <DIV><FONT size=3D2> --</FONT></DIV> <DIV><FONT size=3D2> -- do other stuff = here</FONT></DIV> <DIV><FONT size=3D2>end if</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT size=3D2>I think the fact that you can do this sort of thing = in Eu is=20 another</FONT></DIV> <DIV><FONT size=3D2>advantage it has over QBasic (and Liberty I=20 think)</FONT></DIV> <DIV> </DIV> <DIV><FONT size=3D2>Mark</FONT></DIV> <DIV> </DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A href=3D"mailto:mwfch at MWEB.CO.ZA" = title=3Dmwfch at MWEB.CO.ZA>=08=08</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20 title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, June 13, 2000 = 6:52</DIV> <DIV><BR></DIV> <DIV><FONT face=3DArial size=3D2>This may sound like a stupid question = but ......=20 HOW DA HELL DO YOU PROGRAM THE KEABORD !!!! I just don`t understand . = How=20 do I program the keabord so that when I press a key the computer = know=20 that it is the F (or any other</FONT></DIV> <DIV><FONT face=3DArial size=3D2>key ) and then somthing hapens like a = bom expodes=20 . In Basic all you have to do</FONT></DIV> <DIV><FONT face=3DArial size=3D2>is type INKEY =3D F ( or any other = key ) . Please=20 reply . Thanks .</FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Ferdinand Greyling</FONT></DIV> <DIV><FONT face=3DArial size=3D2>from</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Terminal=20 ------=_NextPart_000_001C_01BFD64F.885E38E0--