Thread: numpad

  1. #1
    cereal killer dP munky's Avatar
    Join Date
    Nov 2002
    Posts
    655

    numpad

    im currently working on a game, a 2 player trivia game speed round sorta thing. anyway, i want 1 user to use the numbers above the letters on the keyboard, and the other to use the num pad....is there any way to do this? THANKS!
    guns dont kill people, abortion clinics kill people.

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Yes. I suppose that answer is insufficient. I will need to ask what OS and API you are using. For example in the win api you can do this

    Code:
    LRESULT callback(HWND hwnd, UINT msg, WPARAM wparam,LPARAM lparam) {
        switch(msg) {
             case WM_KEYUP:
                  if((int) wparam == VK_NUMPAD5) {
                        MessageBox(hwnd, "hello", "message", MB_OK);
                  }
        }
    }

Popular pages Recent additions subscribe to a feed