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.

Newcomers DBPro Corner / Is it possible to detect two keys pressed at once using scancode?

Author
Message
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 24th Feb 2005 19:15
I tried the following (the keys alt+f2):
If scancode()=56 and Scancode()=60 then Goto stuff

but it wont work. whats wrong? and how do i goto stuff when pressing two keys at once?

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Feb 2005 21:17 Edited at: 24th Feb 2005 21:19
You need to use keystate(), using the scancode as the parameter...

if keystate(17) = 1
...


for your example, you could use...

if keystate(56) = 1 and keystate(60) = 1
...


BatVink
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 24th Feb 2005 21:22
thanks )

Login to post a reply

Server time is: 2024-11-11 23:48:53
Your offset time is: 2024-11-11 23:48:53