Is it possible to have Num Lock ALWAYS ON, without the ability of the Num Lock key to turn off?
So this question is not about having num lock on by default.
Is it possible to have num lock turned on, and remove the ability of the num lock button on the keyboard to affect that state?
EDIT (because):
In my keyboard the Home button is really close to the numlock. At work I often use Home and the numpad, but sometimes I accidentally hit the numlock too. As a result my numpad gets turned off which is really sucks when I have to type a lot of numbers and after a while I realise I typed nothing because numlock turned off numpad.
numlock
add a comment |
So this question is not about having num lock on by default.
Is it possible to have num lock turned on, and remove the ability of the num lock button on the keyboard to affect that state?
EDIT (because):
In my keyboard the Home button is really close to the numlock. At work I often use Home and the numpad, but sometimes I accidentally hit the numlock too. As a result my numpad gets turned off which is really sucks when I have to type a lot of numbers and after a while I realise I typed nothing because numlock turned off numpad.
numlock
5
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27
add a comment |
So this question is not about having num lock on by default.
Is it possible to have num lock turned on, and remove the ability of the num lock button on the keyboard to affect that state?
EDIT (because):
In my keyboard the Home button is really close to the numlock. At work I often use Home and the numpad, but sometimes I accidentally hit the numlock too. As a result my numpad gets turned off which is really sucks when I have to type a lot of numbers and after a while I realise I typed nothing because numlock turned off numpad.
numlock
So this question is not about having num lock on by default.
Is it possible to have num lock turned on, and remove the ability of the num lock button on the keyboard to affect that state?
EDIT (because):
In my keyboard the Home button is really close to the numlock. At work I often use Home and the numpad, but sometimes I accidentally hit the numlock too. As a result my numpad gets turned off which is really sucks when I have to type a lot of numbers and after a while I realise I typed nothing because numlock turned off numpad.
numlock
numlock
edited Nov 30 '16 at 13:24
phuclv
8,90063788
8,90063788
asked Jan 16 '16 at 15:09
Adam Varhegyi
77111
77111
5
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27
add a comment |
5
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27
5
5
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27
add a comment |
9 Answers
9
active
oldest
votes
I use CapShift and it's free:
https://www.donationcoder.com/Software/Skrommel/index.html#CAPshift
"CAPshift extends the Caps Lock key by slowing it down...
- Hold down for 0.5 sec to enable/disable.
- Hold down for 1 sec to show the menu.
- Rightclick the tray icon to show the menu.
- Also slows down F1, Insert, NumLock and ScrollLock."
The Advantage is: You don't lose the ability to change NumLock if you really need to.
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
add a comment |
Physically remove the NumLock key. When your finger goes to press it, it won't be there.
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
add a comment |
It's possible to automatically put it back on (within a few milliseconds) when it gets turned off, via an application.
This guy created an autohotkey script for it which he calls "Numlock Enforcer"
http://www.donationcoder.com/forum/index.php?topic=9018.0
Not to most elegant solution, but it should work.
add a comment |
Maybe not the answer you are looking for, but it solved that problem for me:
Activate the sound for the Lock keys in Windows (in Windows 10: Control PanelEase of AccessEase of Access CenterMake the keyboard easier to useTurn on Toggle keys)
That way, when you hit it, it beeps, and you realize it right away. It actually trained me to not hit it anymore at all, because the signal is right when it happens.
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
add a comment |
The BIOS might have a setting to disable the NumLock key, but we need to know
your computer-model and BIOS-version to discuss this more in depth.
Typically, one boots into the BIOS and looks for an item named
"NumLock State", "Bootup NumLock State" or similar, press Enter
and use the arrow keys to select "Off" or "Disabled", then press Enter.
For Windows hackers, the registry contains in HKCUControl PanelKeyboard
an item named InitialKeyboardIndicators which has the undocumented value
of 1
to disable the NumLock. Its effectiveness may vary according to
the version of Windows.
The brutal solution is to pop off the Numlock key cap and use a pen to change
its setting when required. The setting will normally stick, since
Windows XP and later remember its state across boots
(unless the BIOS or other setting interferes).
add a comment |
Step 1
Change the registry to set initial state of NumLock to on at startup:
HKEY_USERS.DEFAULTControl PanelKeyboardInitialKeyboardIndicators
Set to Value to 2
Step 2
Add an AutoHotkey script to monitor the key and ensure it cannot be turned off. Install AutoHotkey, and create a new script named MyBestNumlockHack.ahk. Put this script in your C:Users{User Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup directory.
Numlock::
if (!GetKeyState("NumLock", "T"))
SetNumLockState, On
return
add a comment |
Make a timer and call it NumlOn.
Set the interval on 100.
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Dim NLKey as boolean
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) _
Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
add a comment |
Forgot a sub...
This is fully working
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Private Sub numlockON()
keybd_event(VK_NUMLOCK, 0, 0, 0) ' Press NUMLOCK key down
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
add a comment |
If you use Autohotkey, you can add the following line to your script:
SetNumLockState, AlwaysOn
Be sure to put this line before your hotkeys. I put it at the very beginning of my script so I make sure it always works fine, if you put it in the middle or at the end of your script, it may not work.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1027228%2fis-it-possible-to-have-num-lock-always-on-without-the-ability-of-the-num-lock-k%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
9 Answers
9
active
oldest
votes
9 Answers
9
active
oldest
votes
active
oldest
votes
active
oldest
votes
I use CapShift and it's free:
https://www.donationcoder.com/Software/Skrommel/index.html#CAPshift
"CAPshift extends the Caps Lock key by slowing it down...
- Hold down for 0.5 sec to enable/disable.
- Hold down for 1 sec to show the menu.
- Rightclick the tray icon to show the menu.
- Also slows down F1, Insert, NumLock and ScrollLock."
The Advantage is: You don't lose the ability to change NumLock if you really need to.
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
add a comment |
I use CapShift and it's free:
https://www.donationcoder.com/Software/Skrommel/index.html#CAPshift
"CAPshift extends the Caps Lock key by slowing it down...
- Hold down for 0.5 sec to enable/disable.
- Hold down for 1 sec to show the menu.
- Rightclick the tray icon to show the menu.
- Also slows down F1, Insert, NumLock and ScrollLock."
The Advantage is: You don't lose the ability to change NumLock if you really need to.
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
add a comment |
I use CapShift and it's free:
https://www.donationcoder.com/Software/Skrommel/index.html#CAPshift
"CAPshift extends the Caps Lock key by slowing it down...
- Hold down for 0.5 sec to enable/disable.
- Hold down for 1 sec to show the menu.
- Rightclick the tray icon to show the menu.
- Also slows down F1, Insert, NumLock and ScrollLock."
The Advantage is: You don't lose the ability to change NumLock if you really need to.
I use CapShift and it's free:
https://www.donationcoder.com/Software/Skrommel/index.html#CAPshift
"CAPshift extends the Caps Lock key by slowing it down...
- Hold down for 0.5 sec to enable/disable.
- Hold down for 1 sec to show the menu.
- Rightclick the tray icon to show the menu.
- Also slows down F1, Insert, NumLock and ScrollLock."
The Advantage is: You don't lose the ability to change NumLock if you really need to.
answered Jan 19 '16 at 13:18
Oliver
57823
57823
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
add a comment |
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
Sounds good but the installer does not run on Windows 8.1 :[
– Adam Varhegyi
Jan 19 '16 at 15:23
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
I figured out a way thanks.
– Adam Varhegyi
Jan 19 '16 at 15:31
add a comment |
Physically remove the NumLock key. When your finger goes to press it, it won't be there.
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
add a comment |
Physically remove the NumLock key. When your finger goes to press it, it won't be there.
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
add a comment |
Physically remove the NumLock key. When your finger goes to press it, it won't be there.
Physically remove the NumLock key. When your finger goes to press it, it won't be there.
answered Jan 18 '16 at 20:26
B540Glenn
962515
962515
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
add a comment |
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
The foolproof solution.
– Rohit Gupta
Jan 20 '16 at 0:32
4
4
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
It is actually not foolproof. Some software (HyperV for example) can toggle numlock off again, and when you have removed the key from the keyboard (or used SharpKeys) you have to fool around and reboot to get it back on.
– StingyJack
Oct 25 '17 at 14:22
add a comment |
It's possible to automatically put it back on (within a few milliseconds) when it gets turned off, via an application.
This guy created an autohotkey script for it which he calls "Numlock Enforcer"
http://www.donationcoder.com/forum/index.php?topic=9018.0
Not to most elegant solution, but it should work.
add a comment |
It's possible to automatically put it back on (within a few milliseconds) when it gets turned off, via an application.
This guy created an autohotkey script for it which he calls "Numlock Enforcer"
http://www.donationcoder.com/forum/index.php?topic=9018.0
Not to most elegant solution, but it should work.
add a comment |
It's possible to automatically put it back on (within a few milliseconds) when it gets turned off, via an application.
This guy created an autohotkey script for it which he calls "Numlock Enforcer"
http://www.donationcoder.com/forum/index.php?topic=9018.0
Not to most elegant solution, but it should work.
It's possible to automatically put it back on (within a few milliseconds) when it gets turned off, via an application.
This guy created an autohotkey script for it which he calls "Numlock Enforcer"
http://www.donationcoder.com/forum/index.php?topic=9018.0
Not to most elegant solution, but it should work.
answered Jan 18 '16 at 19:46
cloneman
7421821
7421821
add a comment |
add a comment |
Maybe not the answer you are looking for, but it solved that problem for me:
Activate the sound for the Lock keys in Windows (in Windows 10: Control PanelEase of AccessEase of Access CenterMake the keyboard easier to useTurn on Toggle keys)
That way, when you hit it, it beeps, and you realize it right away. It actually trained me to not hit it anymore at all, because the signal is right when it happens.
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
add a comment |
Maybe not the answer you are looking for, but it solved that problem for me:
Activate the sound for the Lock keys in Windows (in Windows 10: Control PanelEase of AccessEase of Access CenterMake the keyboard easier to useTurn on Toggle keys)
That way, when you hit it, it beeps, and you realize it right away. It actually trained me to not hit it anymore at all, because the signal is right when it happens.
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
add a comment |
Maybe not the answer you are looking for, but it solved that problem for me:
Activate the sound for the Lock keys in Windows (in Windows 10: Control PanelEase of AccessEase of Access CenterMake the keyboard easier to useTurn on Toggle keys)
That way, when you hit it, it beeps, and you realize it right away. It actually trained me to not hit it anymore at all, because the signal is right when it happens.
Maybe not the answer you are looking for, but it solved that problem for me:
Activate the sound for the Lock keys in Windows (in Windows 10: Control PanelEase of AccessEase of Access CenterMake the keyboard easier to useTurn on Toggle keys)
That way, when you hit it, it beeps, and you realize it right away. It actually trained me to not hit it anymore at all, because the signal is right when it happens.
answered Jan 19 '16 at 1:30
Aganju
8,41231335
8,41231335
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
add a comment |
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
Nice idea, working with built-in functionality!
– Oliver
Jan 19 '16 at 13:20
add a comment |
The BIOS might have a setting to disable the NumLock key, but we need to know
your computer-model and BIOS-version to discuss this more in depth.
Typically, one boots into the BIOS and looks for an item named
"NumLock State", "Bootup NumLock State" or similar, press Enter
and use the arrow keys to select "Off" or "Disabled", then press Enter.
For Windows hackers, the registry contains in HKCUControl PanelKeyboard
an item named InitialKeyboardIndicators which has the undocumented value
of 1
to disable the NumLock. Its effectiveness may vary according to
the version of Windows.
The brutal solution is to pop off the Numlock key cap and use a pen to change
its setting when required. The setting will normally stick, since
Windows XP and later remember its state across boots
(unless the BIOS or other setting interferes).
add a comment |
The BIOS might have a setting to disable the NumLock key, but we need to know
your computer-model and BIOS-version to discuss this more in depth.
Typically, one boots into the BIOS and looks for an item named
"NumLock State", "Bootup NumLock State" or similar, press Enter
and use the arrow keys to select "Off" or "Disabled", then press Enter.
For Windows hackers, the registry contains in HKCUControl PanelKeyboard
an item named InitialKeyboardIndicators which has the undocumented value
of 1
to disable the NumLock. Its effectiveness may vary according to
the version of Windows.
The brutal solution is to pop off the Numlock key cap and use a pen to change
its setting when required. The setting will normally stick, since
Windows XP and later remember its state across boots
(unless the BIOS or other setting interferes).
add a comment |
The BIOS might have a setting to disable the NumLock key, but we need to know
your computer-model and BIOS-version to discuss this more in depth.
Typically, one boots into the BIOS and looks for an item named
"NumLock State", "Bootup NumLock State" or similar, press Enter
and use the arrow keys to select "Off" or "Disabled", then press Enter.
For Windows hackers, the registry contains in HKCUControl PanelKeyboard
an item named InitialKeyboardIndicators which has the undocumented value
of 1
to disable the NumLock. Its effectiveness may vary according to
the version of Windows.
The brutal solution is to pop off the Numlock key cap and use a pen to change
its setting when required. The setting will normally stick, since
Windows XP and later remember its state across boots
(unless the BIOS or other setting interferes).
The BIOS might have a setting to disable the NumLock key, but we need to know
your computer-model and BIOS-version to discuss this more in depth.
Typically, one boots into the BIOS and looks for an item named
"NumLock State", "Bootup NumLock State" or similar, press Enter
and use the arrow keys to select "Off" or "Disabled", then press Enter.
For Windows hackers, the registry contains in HKCUControl PanelKeyboard
an item named InitialKeyboardIndicators which has the undocumented value
of 1
to disable the NumLock. Its effectiveness may vary according to
the version of Windows.
The brutal solution is to pop off the Numlock key cap and use a pen to change
its setting when required. The setting will normally stick, since
Windows XP and later remember its state across boots
(unless the BIOS or other setting interferes).
answered Jan 18 '16 at 20:13
harrymc
252k12259560
252k12259560
add a comment |
add a comment |
Step 1
Change the registry to set initial state of NumLock to on at startup:
HKEY_USERS.DEFAULTControl PanelKeyboardInitialKeyboardIndicators
Set to Value to 2
Step 2
Add an AutoHotkey script to monitor the key and ensure it cannot be turned off. Install AutoHotkey, and create a new script named MyBestNumlockHack.ahk. Put this script in your C:Users{User Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup directory.
Numlock::
if (!GetKeyState("NumLock", "T"))
SetNumLockState, On
return
add a comment |
Step 1
Change the registry to set initial state of NumLock to on at startup:
HKEY_USERS.DEFAULTControl PanelKeyboardInitialKeyboardIndicators
Set to Value to 2
Step 2
Add an AutoHotkey script to monitor the key and ensure it cannot be turned off. Install AutoHotkey, and create a new script named MyBestNumlockHack.ahk. Put this script in your C:Users{User Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup directory.
Numlock::
if (!GetKeyState("NumLock", "T"))
SetNumLockState, On
return
add a comment |
Step 1
Change the registry to set initial state of NumLock to on at startup:
HKEY_USERS.DEFAULTControl PanelKeyboardInitialKeyboardIndicators
Set to Value to 2
Step 2
Add an AutoHotkey script to monitor the key and ensure it cannot be turned off. Install AutoHotkey, and create a new script named MyBestNumlockHack.ahk. Put this script in your C:Users{User Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup directory.
Numlock::
if (!GetKeyState("NumLock", "T"))
SetNumLockState, On
return
Step 1
Change the registry to set initial state of NumLock to on at startup:
HKEY_USERS.DEFAULTControl PanelKeyboardInitialKeyboardIndicators
Set to Value to 2
Step 2
Add an AutoHotkey script to monitor the key and ensure it cannot be turned off. Install AutoHotkey, and create a new script named MyBestNumlockHack.ahk. Put this script in your C:Users{User Name}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup directory.
Numlock::
if (!GetKeyState("NumLock", "T"))
SetNumLockState, On
return
answered Nov 21 '17 at 15:29
HaveSpacesuit
17818
17818
add a comment |
add a comment |
Make a timer and call it NumlOn.
Set the interval on 100.
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Dim NLKey as boolean
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) _
Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
add a comment |
Make a timer and call it NumlOn.
Set the interval on 100.
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Dim NLKey as boolean
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) _
Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
add a comment |
Make a timer and call it NumlOn.
Set the interval on 100.
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Dim NLKey as boolean
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) _
Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
Make a timer and call it NumlOn.
Set the interval on 100.
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Dim NLKey as boolean
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) _
Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
answered Mar 23 at 2:04
Brollie
1
1
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
add a comment |
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
1
1
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
Where’s the beef? I suppose you want the use to put this code into a file. What then? How do you use it? How does it work? Please do not respond in comments; edit your answer to make it clearer and more complete.
– Scott
Mar 23 at 2:18
add a comment |
Forgot a sub...
This is fully working
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Private Sub numlockON()
keybd_event(VK_NUMLOCK, 0, 0, 0) ' Press NUMLOCK key down
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
add a comment |
Forgot a sub...
This is fully working
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Private Sub numlockON()
keybd_event(VK_NUMLOCK, 0, 0, 0) ' Press NUMLOCK key down
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
add a comment |
Forgot a sub...
This is fully working
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Private Sub numlockON()
keybd_event(VK_NUMLOCK, 0, 0, 0) ' Press NUMLOCK key down
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
Forgot a sub...
This is fully working
Public Const VK_NUMLOCK = &H90
Declare Function GetKeyState Lib "user32" Alias "GetKeyState" _
(ByVal ByValnVirtKey As Integer) As Short
Private Sub numlockON()
keybd_event(VK_NUMLOCK, 0, 0, 0) ' Press NUMLOCK key down
keybd_event(VK_NUMLOCK, 0, KEYEVENTF_KEYUP, 0)
End Sub
Private Sub me_keyDown(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.NumLock And Not NLKey Then
If Not GetKeyState(VK_NUMLOCK) Then
e.Handled = True
NumlOn.Start()
Exit Sub
End If
End If
End sub
Private Sub NumlOn_Tick(sender As Object, e As EventArgs) Handles NumlOn.Tick
NLKey = True
If Not GetKeyState(VK_NUMLOCK) Then numlockON()
Application.DoEvents()
NumlOn.Stop()
NLKey = False
End Sub
answered Mar 23 at 2:18
brollie
1
1
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
add a comment |
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
1
1
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
Welcome to Super User. Rather than posting multiple answers, please just correct the previous answer and delete this one, or delete that one if it needs the changes in this one. Also, what Scott said on your other answer.
– fixer1234
Mar 23 at 2:24
add a comment |
If you use Autohotkey, you can add the following line to your script:
SetNumLockState, AlwaysOn
Be sure to put this line before your hotkeys. I put it at the very beginning of my script so I make sure it always works fine, if you put it in the middle or at the end of your script, it may not work.
add a comment |
If you use Autohotkey, you can add the following line to your script:
SetNumLockState, AlwaysOn
Be sure to put this line before your hotkeys. I put it at the very beginning of my script so I make sure it always works fine, if you put it in the middle or at the end of your script, it may not work.
add a comment |
If you use Autohotkey, you can add the following line to your script:
SetNumLockState, AlwaysOn
Be sure to put this line before your hotkeys. I put it at the very beginning of my script so I make sure it always works fine, if you put it in the middle or at the end of your script, it may not work.
If you use Autohotkey, you can add the following line to your script:
SetNumLockState, AlwaysOn
Be sure to put this line before your hotkeys. I put it at the very beginning of my script so I make sure it always works fine, if you put it in the middle or at the end of your script, it may not work.
answered Dec 9 at 15:08
Shayan
12219
12219
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1027228%2fis-it-possible-to-have-num-lock-always-on-without-the-ability-of-the-num-lock-k%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
remove the numlock key and epoxy the switch in the on position, pop the key back on.
– Moab
Jan 16 '16 at 16:55
W-why would you need that? just curious
– Registered User
Jan 18 '16 at 16:53
@RegisteredUser see my edit
– Adam Varhegyi
Jan 18 '16 at 16:58
superuser.com/a/688895 + superuser.com/a/688891
– dxiv
Jan 18 '16 at 20:27