locked
Virtual Key Code for Numpad plus, numpad minus, numpad delete? RRS feed

  • Question

  • Hello,
    I'm looking for the virtual key code for the Numpad plus, Numpad minus and Numpad dot keys. I can't find them on the net.
    Tuesday, February 19, 2008 10:34 AM

Answers

  • Hi,

    Try this virtual key codes:
    http://delphi.about.com/od/objectpascalide/l/blvkc.htm

    VK_NUMPAD0 60 Numeric keypad 0 key
    VK_NUMPAD1 61 Numeric keypad 1 key
    VK_NUMPAD2 62 Numeric keypad 2 key
    VK_NUMPAD3 63 Numeric keypad 3 key
    VK_NUMPAD4 64 Numeric keypad 4 key
    VK_NUMPAD5 65 Numeric keypad 5 key
    VK_NUMPAD6 66 Numeric keypad 6 key
    VK_NUMPAD7 67 Numeric keypad 7 key
    VK_NUMPAD8 68 Numeric keypad 8 key
    VK_NUMPAD9 69 Numeric keypad 9 key
    VK_SEPARATOR 6C Separator key
    VK_SUBTRACT 6D Subtract key
    VK_DECIMAL 6E Decimal key
    VK_DIVIDE 6F Divide key

    Hope this helps

    Cheers,
       Jakub G
    Tuesday, February 19, 2008 11:14 AM

All replies

  • Hi,

    Try this virtual key codes:
    http://delphi.about.com/od/objectpascalide/l/blvkc.htm

    VK_NUMPAD0 60 Numeric keypad 0 key
    VK_NUMPAD1 61 Numeric keypad 1 key
    VK_NUMPAD2 62 Numeric keypad 2 key
    VK_NUMPAD3 63 Numeric keypad 3 key
    VK_NUMPAD4 64 Numeric keypad 4 key
    VK_NUMPAD5 65 Numeric keypad 5 key
    VK_NUMPAD6 66 Numeric keypad 6 key
    VK_NUMPAD7 67 Numeric keypad 7 key
    VK_NUMPAD8 68 Numeric keypad 8 key
    VK_NUMPAD9 69 Numeric keypad 9 key
    VK_SEPARATOR 6C Separator key
    VK_SUBTRACT 6D Subtract key
    VK_DECIMAL 6E Decimal key
    VK_DIVIDE 6F Divide key

    Hope this helps

    Cheers,
       Jakub G
    Tuesday, February 19, 2008 11:14 AM
  • Hi,

    Keycode for Numpad's Plus key is not there?
    Is it omitted deliberately. I need the keycode for NumPad's + key. Can someone help?

    Thanks,
    Santosh Thankachan

    Friday, June 13, 2008 10:20 AM
  •  

    6D
    • Marked as answer by M0nkeyMaster Thursday, April 23, 2009 11:10 AM
    • Unmarked as answer by M0nkeyMaster Thursday, April 23, 2009 11:10 AM
    Monday, July 14, 2008 10:32 AM
  • Numpad Plus: 107 (Hexadecimal 6B)
    Numpad Minus: 109 (Hexadecimal 6D)
    Numpad Asterisk: 106 (Hexadecimal 6A)
    Numpad Slash: 111 (Hexadecimal 6F)
    Numpad Dot (Delete): 110 (Hexadecimal 6E)
    • Proposed as answer by deresser Monday, August 10, 2009 4:14 PM
    Monday, August 10, 2009 4:13 PM
  • Numpad Plus: 107 (Hexadecimal 6B)
    Numpad Minus: 109 (Hexadecimal 6D)
    Numpad Asterisk: 106 (Hexadecimal 6A)
    Numpad Slash: 111 (Hexadecimal 6F)
    Numpad Dot (Delete): 110 (Hexadecimal 6E)


    This thread is old.  Did you notice the dates? 

    By the way.....

    You can also use the enumeration, Keys, defined in the Windows.Forms namespace.

    " * " = Keys.Multiply = 106
    " + " = Keys.Add      = 107
    " - " = Keys.Subtract = 109
    " . " = Keys.Decimal  = 110
    " / " = Keys.Divide   = 111

    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, August 10, 2009 4:30 PM
  • This thread was the first hit I ran into, while Googling "Virtual Key Code Plus".
    Later, I figured out the answer by trial and error.
    This might be a help for anybody else running into this thread the same way I did.
    (You must have noticed the right answer hadn't been mentioned yet.)

    And I've got no idea what you're talking about.
    Monday, August 10, 2009 4:36 PM
  • No idea.  You must be fairly new at programming.

    class KeyStrokeTester
        {
            public void ReportKeys()
            {
                ConsoleKey exitCode = ConsoleKey.Enter;
                bool exit = false;
                while (!exit)
                {
                    // read keystroke without printing echo to console window.
                    ConsoleKeyInfo info = Console.ReadKey(true);
                    switch (info.Key)
                    {
                        case ConsoleKey.Multiply:
                            Console.WriteLine("Multiply Key");
                            break;
                        case ConsoleKey.Add:
                            Console.WriteLine("Add Key");
                            break;
                        case ConsoleKey.Subtract:
                            Console.WriteLine("Subtract Key");
                            break;
                        case ConsoleKey.Decimal:
                            Console.WriteLine("Decimal Key");
                            break;
                        case ConsoleKey.Divide:
                            Console.WriteLine("Divide Key");
                            break;
                        case ConsoleKey.Enter:
                            exit = true;
                            break;
                        default:
                            Console.WriteLine("Wrong key pressed.");
                        break;
                    }
                }
               
            }
        }

    Test it in a Console app like this....


            static void Main(string[] args)
            {
                new KeyStrokeTester().ReportKeys();
            }

    Mark the best replies as answers. "Fooling computers since 1971."
    Monday, August 10, 2009 5:22 PM
  • You're right, I am. But never mind. My problem is solved, you've never had one.
    Monday, August 10, 2009 5:27 PM