Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
259 views

Turn On and Off Numlock Key using C# (.Net Framework 4.7)

I have tried with InputSimulator and InputSimulatorPlus package also. Require Condition as below if current_Number Odd: turn Off NumLock Key if current_Number Even : turn On NumLock Key bool ...
Vishvashkumar Patel's user avatar
0 votes
1 answer
158 views

Basic Excel VBA turns number lock off, I've no idea why [duplicate]

This is the code that I use regularly fired from a Button (Form Control) that is stored in PERSONAL.XLSB and therefore available universally on this PC. Sub Today() Dim Today As Date ...
Paul's user avatar
  • 69
1 vote
1 answer
699 views

How do I manually toggle the NumLock Key with C# in WPF?

I've been searching for a while and there are mostly results in C++ or other languages, and not C#. Things I've seen: keybd_event() // A c++ method that theoretically can be included with a DLL ...
not_a_generic_user's user avatar
1 vote
2 answers
5k views

Excel VBA - make sure Numlock is always ON

I know this has been put to the attention before, but I can't solve it. I have a button that calls a sub and in that sub I want to make sure that numlock is always on. The first time, i.e. if the ...
Dolphin975's user avatar
0 votes
1 answer
193 views

Why doesn't Shift + Numlock work, even though there is +NumLock::NumLock?

I have this: NumLock::CapsLock +NumLock::NumLock However Shift + Numlock doesn't work, even though I put it in a standalone script, and run in safe mode, with the newest version. Using this works: +...
Ooker's user avatar
  • 2,698
0 votes
0 answers
1k views

Excel VBA - SendKeys "{F2}" - keeps toggling num-lock

After using setting a cell to select and then using SendKeys "{F2}" (So that the cell is ready for input) it likes to toggle num-lock every time this is ran. I have seen people say to use SendKeys "{...
AlbertM's user avatar
  • 13
0 votes
1 answer
221 views

Num Lock on, but the Num Lock LED off

I want to have Num Lock on (be able to use the numbers), but have the LED indicator on my keyboard turned off. I don't know what way I want to do this (Autoit, AutoHotKey, C#...). I found this link ...
spunit's user avatar
  • 565
0 votes
1 answer
3k views

Toggle NUMLOCK / CAPSLOCK / SCROLLLOCK while the workstation is locked?

I am trying to toggle the indicator lights on my keyboard for Num Lock, Caps Lock, and Scroll Lock. (I just want to have them turn them off automatically at nighttime.) This is trivial using ...
JonathanDavidArndt's user avatar
0 votes
0 answers
83 views

Why does a USB Numeric Keypad generating two events under Mac OS X when NumLock is on?

I have just acquired a Compucessory 2-port USB numeric keypad (Model: 34222). Under Linux, using Python 2 and PySide, it works correctly regardless of the NumLock setting. (It generates different ...
Ubuntourist's user avatar
0 votes
1 answer
186 views

preventDefault() action that works on numlock key 144 so that numberpad can still be used for shortcuts

I'm trying to build a website that uses the numberpad for keyboard shortcuts to push different buttons. For one of the events I need more than 9 shortcuts. To keep things simple on the user's end I'd ...
Maverick 's user avatar
0 votes
1 answer
123 views

Constant update of the form's data

This is basically a simple question. I want to update the label dynamically when I press the capslock and numlock keys while the main form is open in the WinForm application on the .net platform. How ...
Sercan KARACA's user avatar
0 votes
1 answer
668 views

UWP - How to check NumLock and CapsLock status?

How can check for CapsLock or NumLock status and see if they are enabled or disabled (on or off)? As far as I searched, I know only it's possible to check if they are pressed.
TheSETJ's user avatar
  • 528
2 votes
1 answer
2k views

Why is numlock off by default?

Is there any specific reason for that? Any thought would be appreciated. Not looking for how to enable it.
Dragas's user avatar
  • 1,225
1 vote
2 answers
9k views

Send Keys is Disabling NumLock

Issue: Upon me using SendKeys to copy data from an Excel application to another (non-Microsoft) application, my Num Lock becomes disabled. Sub Test() Range("A1:B71").Select SendKeys "^C" '...
K.Dᴀᴠɪs's user avatar
  • 10.1k
-1 votes
1 answer
174 views

Numlock key pad not working vb.net textbox?

I have noticed that my textbox will not accept numbers from the num lock key pad how do I allow this in vb.net?
TM80's user avatar
  • 123
0 votes
2 answers
1k views

State of Num Caps ScrollLock in StatusStrip WindowsForms

Tell me, please, how do I show in StatusStrip when CAPS_LOCK key is enabled. I tried to follow the examples: one and two but nothing is displayed in my app. I created a new project, added ...
Fundo's user avatar
  • 1
5 votes
0 answers
387 views

How do I use the NumLock LED to indicate Compose is active in X.org?

I have a Compose key on my keyboard, but use the NumLock key for other purposes whilst using the numpad for entering numbers only. So I don't really need a NumLock indicator, but would like to use ...
Neppomuk's user avatar
  • 1,170
2 votes
0 answers
985 views

How to prevent NumLock from disabling?

I'm making a simple game and I want to control it using numeric keyboard (including NumLock key). A player should be able to press several keys simultaneously, or press and hold any key. After ...
grabantot's user avatar
  • 2,139
5 votes
1 answer
3k views

Detecting a NUMLOCK / CAPSLOCK / SCRLOCK keypress/keyup in Python

In a game I'm developing, I want to detect a NUMLOCK keypress (or keyup), like registering a "callback" function when it gets pressed. I'm not asking to read its state in a given moment, I can do ...
MestreLion's user avatar
  • 13.5k
2 votes
1 answer
550 views

Getting and setting NumLock state in Lazarus

Is there a reliable cross-platform way to programmatically get and set the NumLock state in Lazarus / Free Pascal? I've found GetKeyState() in LclIntf which seems to work for getting the state (and ...
Fat Monk's user avatar
  • 2,235
2 votes
1 answer
859 views

Keylistener not responding to numlock numbers

i'm making a keylistener that listens to ctrl-1 and ctrl-2. Im making a quiz for teams. Team 1 should press ctrl-1 if they want to answer. Team 2 should press ctrl-2 if they want to answer. The ...
user3284809's user avatar
4 votes
2 answers
396 views

Can you turn NumLock on in XNA?

Can you turn NumLock on in XNA? (I'm looking for a solution to XNA Number lock affects input.)
Xonatron's user avatar
  • 15.9k
3 votes
1 answer
3k views

Is there any way, in Python, to programmatically change the CAPS LOCK/NUM LOCK/SCROLL LOCK states on a hidraw device

This is the same question as in Change keyboard locks in Python or How to change caps lock status without key press. But there is a difference!! I don't want to change the lights on /dev/console or /...
Jorg K's user avatar
  • 91
0 votes
0 answers
357 views

Reading numpad symbols under Mono

I am developing a console application, that should listen for digits from a numpad keyboard in both num lock states - on and off. The application is running on Raspberry Pi with Arch Linux and Mono. ...
Raisolution's user avatar
9 votes
2 answers
6k views

Check Scroll Lock, Num Lock & Caps Lock in JavaScript on Page Load

Is it possible to check the status of Scroll Lock, Num Lock and Caps Lock on page load of a web page? I've found ways to check after a keypress using JavaScript, but that's not what I'm asking.
JustBeingHelpful's user avatar
2 votes
0 answers
2k views

How to check NUM LOCK key state in Java in a portable way without displaying a frame?

I want to know at runtime if the NUM LOCK or the CAPS LOCK key is on or off. But I need to do that in a portable way (for all Java platforms). The following two methods don't work: 1) It throws ...
Luis Soeiro's user avatar
  • 4,272
1 vote
2 answers
573 views

How do I remap the NumLock key in Java Swing?

You may have read my earlier question about remapping my keyboard at a low level in Java and I did find a solution - mostly. To be honest, I oversimplified the problem I was trying to solve. I not ...
Steve Cohen's user avatar
  • 4,831
1 vote
1 answer
682 views

Using NUM/CAPS/SCROLL LOCK as RegisterHotKey Modifier in WinAPI

I have the very well-known WinAPI function: BOOL WINAPI RegisterHotKey( __in_opt HWND hWnd, __in int id, __in UINT fsModifiers, __in UINT vk ); I see that I supposedly can ...
alt.126's user avatar
  • 1,107
0 votes
3 answers
2k views

Get and set Num/Caps/Scroll-lock status in Mono C#

Is there a way in Mono.Net to get and set the Num/Caps/Scroll-lock status platform independent (Linux and Windows)? Thanks in advance.
willeM_ Van Onsem's user avatar
5 votes
3 answers
4k views

Disabling num-lock toggle in C#?

I would like to maintain num-lock ON as long as my application is running, so that if the user un-toggles num-lock, it will immediately be toggled back on. What's the simplest way to achieve that in C#...
Roee Adler's user avatar
  • 33.9k
5 votes
3 answers
8k views

How can I check and toggle Num-Lock programmatically in C#?

I would like to programmatically check the value of, and be able to toggle num-lock. What's the simplest way to do that in C#? The reason is that I want to verify num-lock is "ON" at program start. ...
Roee Adler's user avatar
  • 33.9k