PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Trapping for Escape Key  (Read 750 times)

Jeffrey Ferreira

  • Diamond Member
  • *****
  • Posts: 175
  • I must have taken a wrong turn at Albuquerque.
    • View Profile
Trapping for Escape Key
« 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

HendersonS

  • Gold Member
  • ****
  • Posts: 58
    • View Profile
Re: Trapping for Escape Key
« Reply #1 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
}