Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Escape key

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1 Fractal   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 10:32 AM

how can I get it so that if the user presses ''ESC'' then it will do something. if (cKey == ''//???'') {//do something} Could I be any more dumber? (What do you mean, "No"?)

#2 Oluseyi   Members   

2076
Like
Likes
Like

Posted 16 October 2001 - 10:43 AM

Look up WM_KEYDOWN AND VK_*** if it''s for Windows, or getch() and getche() for DOS.

#3 Fractal   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 10:46 AM

but i need to know what character is needed for ''ESC'' as pressing the esc button when creating the code will not work.

Could I be any more dumber?
(What do you mean, "No"?)


#4 Load Runner   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 10:49 AM

VK_ESCAPE if its in windows

#5 Fractal   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 10:53 AM

but what about dos?

Could I be any more dumber?
(What do you mean, "No"?)


#6 Load Runner   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 10:59 AM

i think ESC is dec 27 in ASCII chart but i could be wrong

Edited by - Load Runner on October 16, 2001 6:00:31 PM

#7 RandomTask   Members   

122
Like
Likes
Like

Posted 16 October 2001 - 11:51 AM

LoadRunner is right, it is 27 in dec and it is 1B in hex so I''ll use that.

Now all you have to do is what I described in the other post. When you parse the input String do this

  if( inputString[0] == 0x1B )
{
MyProcessEscapeKeyFunction();
}


This is, of course, as long as the escape key shows up in the standard input string, which I''m pretty sure it will do.

RandomTask




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.