Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clear lastkey()
Message
 
To
23/12/2004 19:07:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00971965
Message ID:
00972134
Views:
19
>Is there a way to clear the lastkey() value WITHOUT fiddling with keyboard buffer.
>eg I can go
>
if lastkey()=27
>  keyboard "!"
>  inkey(0,'H')
>endif
>
>however in certain situations this may interfere with the user's typeahead, so it would be really nice if i could say lastkeyclear() or something.

Short answer is no, you have to put a keystroke oin the buffer to change lastkey(). If you think about it that only makes sense, if LastKey() is supposed to tell you what the last key pressed was then the only way to alter the last key pressed is to press a key.
Previous
Reply
Map
View

Click here to load this message in the networking platform