Key interruption while processing

Hello everybody,

I wanna do something like SCAN utility does while processing the search.
When I fill the window with the parameters that I want to search and submit the scan, the Natural initialize a scan loop and this can be interrupted if I press ANY KEY of the KEYBOARD (e.g: letters, numbers, signals etc) THAT IS NOT a PF-KEY. When the scan operation is interrupted the Natural shows a window that prompt the user to abort or not the scan. (Please, look the attachment)

What I want to know is: how can I code this action on Natural for Unix?

Can someone help me?

Thank’s
SCAN utility interruption.doc (71.5 KB)