BBC BASIC for Windows
« Escape Key »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:57pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Escape Key  (Read 560 times)
bruceoboast
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 6
xx Escape Key
« Thread started on: Nov 17th, 2011, 05:50am »

How does one use the escape key?
User IP Logged

Bruce
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Escape Key
« Reply #1 on: Nov 17th, 2011, 11:24am »

on Nov 17th, 2011, 05:50am, bruceoboast wrote:
How does one use the escape key?

Anyway you like!

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.
User IP Logged

bruceoboast
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 6
xx Re: Escape Key
« Reply #2 on: Nov 18th, 2011, 05:35am »

Thanks, the "*ESC OFF " was what I needed. The othe info may come in handy later.

Bruce
User IP Logged

Bruce
Alba Smith
Guest
xx Re: Escape Key
« Reply #3 on: Mar 3rd, 2012, 04:26am »

How do you write 'ESC OFF'? What is the entire command you need to write?




Kitchen Faucets
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Escape Key
« Reply #4 on: Mar 3rd, 2012, 09:11am »

on Mar 3rd, 2012, 04:26am, Guest-Alba Smith wrote:
How do you write 'ESC OFF'? What is the entire command you need to write?

It's a 'star command', simply prefix it with an asterisk:

Code:
  *ESC OFF 

If you prefer you can use OSCLI, but there's little benefit in this case:

Code:
  OSCLI "ESC OFF" 

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls