Path: utzoo!utgpu!watmath!xenitec!timk From: timk@xenitec.uucp (Tim Kuehn) Newsgroups: comp.databases Subject: Re: dBase/FoxBase question Summary: inkey() works well.. Keywords: foxbase, inkey(), control keys Message-ID: <1989Aug2.004126.14625@xenitec.uucp> Date: 2 Aug 89 00:41:26 GMT Reply-To: timk@xenitec.UUCP (Tim Kuehn) Organization: Xenitec Consulting Services, Kitchener, ON Lines: 45 In article <914@lakesys.UUCP> marc@lakesys.lakesys.com (Marc Rassbach) writes: > >A question for you all.... > >How does one detect the keypress of a control character in dBase. >(Actual enviro is FoxBase under SCO) use the inkey() function. I've used something along the following for the applications I do when I want a character without making the user hit CR. i = 0 do while i = 0 i = inkey() enddo When called, I will contain the ASCII decimal equivalent of the character the user pressed. If you want the character value of the key the user pressed, convert it by: char_val = chr(i) or: char_val = chr(inkey()) if you don't want to bother with an intermediate step. I use this under DOS all the time, and when assisting with beta-testing I ported a DOS application over to the SCO platform, this part of the program had no problems at all. +-----------------------------------------------------------------------------+ |Timothy D. Kuehn timk@xenitec | |TDK Consulting Services !watmath!xenitec!timk | |871 Victoria St. North, Suite 217A | |Kitchener, Ontario, Canada N2B 3S4 (519)-741-3623 | |DOS/Xenix - SW/HW. uC, uP, DBMS. Satisfaction Gauranteed| +-----------------------------------------------------------------------------+ >-- >Marc Rassbach marc@lakesys If you take my advice, that >"I can't C with my AI closed" is your problem, not mine! > If it was said on UseNet, it must be true.