Thread: Arrow key codes

  1. #1
    Registered User
    Join Date
    Jan 2006
    Location
    Latvia
    Posts
    102

    Arrow key codes

    Hi, a little problem here...I need to determine which arrow key is pressed in my console app. I can do it like that: (with numeric keys and letters)
    Code:
        while(!kbhit());
        char ch=getche();
        switch(ch)
        {
                 case  	 	'1':                      cout<<1;         break;
        }
    But I have no clue how to find out which special key is pressed.

  2. #2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM