BBC BASIC for Windows
Programming >> BBC BASIC language >> Escape Key http://bb4w.conforums.com/index.cgi?board=language&action=display&num=1321512645 Escape Key
Post by bruceoboast on Nov 17th, 2011, 05:50am
How does one use the escape key?
Re: Escape Key
Post by admin on Nov 17th, 2011, 11:24am
By default, pressing Esc generates an error (error code 17) which will abort your program, or can be trapped using ON ERROR or ON ERROR LOCAL in the usual way (but note the caveat when using PRIVATE).
Alternatively you can issue the *ESC OFF command, in which case Esc behaves like a regular key, and can be read using INKEY or GET (key code 27).
Lastly, you can detect (asynchronously) when the Esc key is depressed using INKEY(-113).
Richard.
Re: Escape Key
Post by bruceoboast on Nov 18th, 2011, 05:35am
Thanks, the "*ESC OFF " was what I needed. The othe info may come in handy later.
Bruce
Re: Escape Key
Post by Alba Smith on Mar 3rd, 2012, 04:26am
How do you write 'ESC OFF'? What is the entire command you need to write?