Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:21:11+00:00 2026-05-28T15:21:11+00:00

My laptop has a number pad, but it does not have a NumLock key,

  • 0

My laptop has a number pad, but it does not have a NumLock key, and the numpad is actually just a copy of the row of numbers above the letters. This is confirmed by the virtual key codes sent when I press these keys.

I’m trying to develop a small program to mimic alt codes when the alt key and regular numbers are pressed. I use a low-level keyboard hook (I have a similar format working in another program), and first check to see if either alt key is down. If either is, I loop through the VK codes 0x30-0x39 (0-9 keys). If one of those is pressed down at that moment, I discard the actual keystroke by returning a value of 1, and instead send a numpad version of that key instead (alt is still pressed down at this time).

I can confirm that the hook is being reached, and that the alt key being down is being recognized successfully. However, when I check for matches on 0-9, either only a couple are printed before nothing matches after that, or I have to lift up and press down the alt key every time I press a number. Additionally, one number may be printed 16 times after releasing alt having pressed a number, and then holding down alt and pressing another (this one is 16x).

Also, I can confirm the SendInput sequence works via copying the part from the hook, putting it into the main function and replacing i with 0x30. Upon running, a 0 will be typed onto the text document.

When holding down ALT(down)+6+5+ALT(up) in a text document, “65” is what shows. If I add another ALT(down)+6, 16 sixes appear.

Hook Procedure:

LRESULT CALLBACK proc (int code, WPARAM wParam, LPARAM event) //hook proc
{
    if (code < HC_ACTION) //don't process if not meant to
        return CallNextHookEx (0, code, wParam, event); 

    if (GetAsyncKeyState (VK_MENU) & 0x8000) //if either alt is down
    {
        for (int i = 0x30; i <= 0x39; ++i) //loop 0-9
        {
            if (GetAsyncKeyState (i) & 0x8000) //if index is down
            {
                cout << "MATCH\n"; //debug

                input.ki.wVk = i + 0x30; //set VK code to numpad version of index
                input.ki.dwFlags = 0; //key is being pressed
                SendInput (1, &input, sizeof (INPUT)); //send keystroke down

                input.ki.dwFlags = KEYEVENTF_KEYUP; //key is being released
                SendInput (1, &input, sizeof (INPUT)); //send keystroke up

                while (GetAsyncKeyState (i) & 0x8000) //wait for normal key to be released
                    Sleep (10); //don't hog CPU

                return 1; //discard normal key
            } //end if match
        } //end for
    } //end if alt

    return CallNextHookEx (0, code, wParam, event); //if any key not handled, pass on
} //end function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:21:13+00:00Added an answer on May 28, 2026 at 3:21 pm

    Well, I finally came back to this and after some more testing I discovered that programmatically sending [ALT ] [num6] [num5] [ALT ] does nothing whatsoever. I find this odd because I am able to simulate the volume control keys on the Mac keyboards despite not having those keys.

    Since the computer simply can’t send alt codes, I declare this helpful tool royally screwed unless I map thousands of characters.

    EDIT:

    Here’s what you need to do to get the number pad working on the G74SX-XA1:

    1. Download the BIOS 203 (I don’t know if 202 works or not, I went from 201 to 203).
    2. Put the file on a FAT32-formatted flash drive.
    3. Restart the computer and either press F4 to go right into EasyFlash, or navigate to it through the BIOS. The Winflash program that comes with it doesn’t work.
    4. Select the updated BIOS file on the flash drive.
    5. Now the numlock light will always be on and the number pad will have the virtual key codes of a number pad, not the numbers above the letters. This naturally includes ALT codes working.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a laptop with a 5400rpm drive. It has visual studio installed
Imagine this scenario: You have a desktop and a laptop. The desktop has a
I have a desktop, and a Laptop. The Desktop has Windows 7 64-bit and
My laptop had an install error with Vista Ultimate and now it does not
My new work laptop has my native (Polish) locale set. However, I'm simply not
I have just reloaded my laptop and am now trying to setup my localhost
I have a table called Laptop that has a column named HD. How can
I have a laptop running Ubuntu, it has a 32 Bits processor (Intel Core
My company has got quite a number of client laptops out in the field.
I work with a Dell XPS M1710. The laptop has lights in the lid,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.