Hi!

Look up in_key...you can cancel with a "if"
Quote:

1 Input terminated prematurely because inkey_active was set to 0 or another keyboard entry was active at the same time.
9 Input terminated by [Tab]
13 Input terminated by [Enter]
27 Input aborted by [Esc]
72 Input aborted by [Up]
73 Input aborted by [PgUp]
80 Input aborted by [Down]
81 Input aborted by [PgDn]


Ottawa smile