Old 08-30-2009, 07:31 PM   #1 (permalink)
Zewbie
 
Join Date: Jul 2009
Posts: 9
scudder50000 is on a distinguished road
Default keyboard input

I am trying to get my game to quit when I press the Esc key. I can get it to quit with most keys except with escape, alt, ctrl, and symbol keys. can someone link me to a page that gives the code I need for different keys I would be very appreciative.

This is the code I am using to close the game:
Code:
if (Keyboard.GetState().IsKeyDown(Keys.Q))
                this.Exit();
It works with Q but not with Escape.
__________________

Time, time, and chance are on my side. The inevitable has be denied.



scudder50000 is offline   Reply With Quote

Advertisement [Remove Advertisement]
Old 09-01-2009, 09:41 AM   #2 (permalink)
Experienced Member
 
Tiptup300's Avatar
 
Join Date: Apr 2008
Posts: 808
Tiptup300 has disabled reputation
Default

Hmm, are you sure it's just not your keyboard. That sounds more of a problem with XNA...



Tiptup300 is offline   Reply With Quote
Old 09-01-2009, 08:30 PM   #3 (permalink)
Zewbie
 
Join Date: Jul 2009
Posts: 9
scudder50000 is on a distinguished road
Default

not sure what the issue was, but I got it to work.
__________________

Time, time, and chance are on my side. The inevitable has be denied.



scudder50000 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools