Archived

This topic is now archived and is closed to further replies.

Fractal

Escape key

Recommended Posts

Fractal    122
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"?)

Share this post


Link to post
Share on other sites
Fractal    122
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"?)

Share this post


Link to post
Share on other sites
RandomTask    122
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

Share this post


Link to post
Share on other sites