Function to read last key pressed
The READKEY() function returns a number representing the ASCII code for the last key pressed from within a form or an @...GET. If the contents of the GET or memory variable were modified by the READ, then 256 is added to the return value. The CLEAR TYPEAHEAD commands clears the READKEY() function to zero.
if readkey()=ctrl('g') set message to "Operation canceled." endif