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 AppGameKit Corner / Detecting any keyboar presses

Author
Message
blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 25th Jul 2017 19:45
I want to detect when any keyboard (real keyboard not a virtual keyboard) key has been pressed. How do I go about doing this?

Jason
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 25th Jul 2017 20:07
You can use "GetRawLastKey( )"

blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 25th Jul 2017 20:47
Thank you. That done the job just fine.

Jason
bszaronos
6
Years of Service
User Offline
Joined: 7th Jul 2017
Location:
Posted: 25th Jul 2017 20:51
You can use
getrawkeypressed, getrawkeyreleased,getrawkeystate, or getrawlastkey

There is a handy webpage that you can search for commands with AGK. Almost all have examples of the code.

http://www.appgamekit.com/documentation/search.html



Just go to http://www.asciitable.com/ for the ascii codes to use.

-Brian
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 25th Jul 2017 22:55

Login to post a reply

Server time is: 2024-04-18 04:30:05
Your offset time is: 2024-04-18 04:30:05