Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 8th Jun 2003 03:55
I'm trying to detect when a user make a selection. I want to know if they press the 'DEL' key. If they do, something happens, if they don't something else happens.
I've been trying this:

choice$ = INKEY$()
choice = ASC(choice$)
IF choice = 127 THEN do something
IF choice 127 THEN do something else
Trouble is, either this simply doesn't work or it happens so quickly that the program just carries on with what it below.

I could use INPUT but it's crap....I don't wanna press enter after the selection.
Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Jun 2003 04:29
I don't think that the DEL key registers with INKEY$().

Try using KEYSTATE(211) instead (I think that's the right number).
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 8th Jun 2003 07:05


Pneumatic Dryll
FieldDoc
23
Years of Service
User Offline
Joined: 30th May 2003
Location: London, UK
Posted: 8th Jun 2003 12:11
Thanks again PD.

BTW, Do you ever sleep.....4am when you posted that!


Life is like a penis:
When it's soft you can't beat it, when it's hard you get screwed.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 9th Jun 2003 08:00
*hehe* I keep unusual hours because I deal with the US of Awkward. I also have this annoying tendancy to stay awake programming for 3 days then sleep a day, at the end of which I order a skip to deal with the coffee mugs.

Pneumatic Dryll

Login to post a reply

Server time is: 2026-07-11 10:05:58
Your offset time is: 2026-07-11 10:05:58