DirectInput8 turns off my numlock

Started by
2 comments, last by IO Fission 23 years, 4 months ago
It''s really annoying. Since I''ve been using DInput8, everytime I run my program the numlock on my keyboard gets turned off. Too many times I''ve managed to accidentally turn on overwrite and overwritten something I didn''t want to. Does anybody know of a way to stop this, or at least switch it back to on after DInput has shut down? Thanx IO_FissionSig();
Advertisement
You can toggle the numlock key in WinNT by using the keybd_event() function, just specify VK_NUMLOCK as the virtual key code. In Win9x, you can use the SetKeyboardState() function, though first you should initialize the key array properly.
From MSDN docs: "Because the SetKeyboardState function alters the input state of the calling thread and not the global input state of the system, an application cannot use SetKeyboardState to set the num lock, caps lock, or scroll lock indicator lights on the keyboard."

I''m not game to try unless someone else already has.


IO_FissionSig();
It won''t toggle the lights but it will still toggle the lock state.

This topic is closed to new replies.

Advertisement