PxPlus User Forum

Main Board => Discussions => Language => Topic started by: Jeffrey Ferreira on May 18, 2022, 10:58:45 AM

Title: Trapping for Escape Key
Post by: Jeffrey Ferreira on May 18, 2022, 10:58:45 AM
Hello,

Is there any way to trap for the ESC key being hit. I tried _EOM$ and ctl but i cannot seem to distinguish it from clicking the X-Close .
or would i need to modify *UCK

thanks

jeff
Title: Re: Trapping for Escape Key
Post by: HendersonS on May 18, 2022, 01:22:24 PM
Hi jeffrey,

try this
Code: [Select]
ignore_exit=0
IF CTL=-1999 OR CTL=4 THEN {
MSGBOX "Do you want to exit the process ?","Exit",?,YESNO,tim=3",resp$
IF resp$<>"YES" THEN ignore_exit=1; RETURN
}