Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LastKey()
Message
From
02/01/2019 07:57:27
 
 
To
02/01/2019 05:36:09
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01665038
Message ID:
01665043
Views:
64
>>Does anyone know if there is a Windows API behind the LastKey() function of VFP9 which can be called directly?
>
>I don't think there would be, since Fox doesn't use system events for managing its Read statement, not in this sense. LastKey() returns the code of the key used to terminate the Read statement, and it's a function which existed since Fox for DOS, i.e. it was written before Windows were an option for Fox (and when it had Unix and Mac versions).

Thanks Dragan, very interesting. I wrote a little test program which accepts a keystroke into INKEY() and then does various other processing (just arbitrary stuff but no further keyboard input) and then tested LASTKEY() and it returns the value that was returned in the initial INKEY() function. This little program has no READ in it. Does running a bit of code using "execute code" use an implied READ or something?

Anyway, too bad if there is no API to call because WinDev does not have a LASTKEY() function and I was hoping to be able to know whatever the last key pressed was no matter where or when pressed. It has INKEY() equivalent but no LASTKEY().

Thanks
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform