Sign in to follow this  
Followers 0
babou

num lock keyboard

6 posts in this topic

helo all :)

I have a problem with XP and the num lock keyboard, the script change the registry key :

if RegRead ("HKEY_CURRENT_USER\Control Panel\keyboard", "InitialKeyboardIndicators") <> "2" Then RegWrite ("HKEY_CURRENT_USER\Control Panel\keyboard","InitialKeyboardIndicators", "REG_SZ", "2")

it is a simple script, it run and write the right value in the registry, but num lock still state ...

when I change the value manualy, it works :)

Do you why ?

Thanks

Share this post


Link to post
Share on other sites



helo all :)

I have a problem with XP and the num lock keyboard, the script change the registry key :

if RegRead ("HKEY_CURRENT_USER\Control Panel\keyboard", "InitialKeyboardIndicators") <> "2" Then RegWrite ("HKEY_CURRENT_USER\Control Panel\keyboard","InitialKeyboardIndicators", "REG_SZ", "2")

it is a simple script, it run and write the right value in the registry, but num lock still state ...

when I change the value manualy, it works :)

Do you why ?

Thanks

That reg key indicates numlock state after logon. You wont see a change until you log off then back on. If the value is 2, numlock should be on after you log in.


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites

That reg key indicates numlock state after logon. You wont see a change until you log off then back on. If the value is 2, numlock should be on after you log in.

It is the pb, the script put the reg value to 2, I log off and log on, then the num lock state after logon.

i do not understand why ?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

It is the pb, the script put the reg value to 2, I log off and log on, then the num lock state after logon.

i do not understand why ?

I've encountered the same problem - Even with the reg change, my NumLock is off after every reboot. To resolve this, I've added a script with the following content and set it to run on startup:

Global Const $VK_NUMLOCK = 0x90
$NumState = DllCall("user32.dll", "long", "GetKeyState", "long", $VK_NUMLOCK)

If $NumState[0] <> 1 Then
    Send("{NUMLOCK}")
EndIf

I'd give credit to the code to whomever had posted the status of the NumLock key, but I can't remember which post I got it from.

Edit: credit to gafrost in this post for the NumLock status checks.

Edited by Monamo

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

great :)

thanks a lot it woks :)

Share this post


Link to post
Share on other sites

Thank you for and gafrost for this!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0