Windows:
1. Set the numlock entry to enable in bios, and set the PNP with OS entry to enable in BIOS. However, when logging out of a user, the numlock is disabled and must be opened manually.
2. Open Registry Editor and find HKEY_USERS /. default/control panel/keyboard, change the key value of initialkeyboardindicators under it to "2", exit the Registry Editor, restart the computer, and you will find that the lights on the keypad are no longer out.
3. In addition, you only need to perform minor operations on the config. SYS file. The setting method is as follows:
1. Click the "run" command in the "Start" menu, type "sysedit" in the "open" box, and press the Enter key to open the "System Configuration editing program" window.
2. Click the "config. sys" title bar, switch it to the current editing window, and type "numlock = on" in the editing area.
3. Save the changes and close the System Configuration editor window.
In Linux:
1. In the KDE environment:
KDE Control Center --> peripherals --> keyboard --> numlock is enabled when KDE is started.
2. Windows maker:
Code:
# Include </usr/x11r6/include/X11/extensions/xtest. h>
# Include </usr/x11r6/include/X11/keysym. h>
Int main (void)
{
Display * disp = xopendisplay (null );
If (disp = NULL) return 1;
Xtestfakekeyevent (disp, xkeysymtokeycode (disp, xk_num_lock), true,
Currenttime );
Xtestfakekeyevent (disp, xkeysymtokeycode (disp, xk_num_lock), false,
Currenttime );
Xclosedisplay (disp );
Return 0;
}
1) Save the above Code as numlock. c
2). GCC-I/usr/x11r6/include-L/usr/x11r6/lib-O setnumlock numlock. C-lx11-lxtst
3) EDIT. xinitrc or. xsession to add the following content.
/Usr/x11r6/bin/setnumlock
3. Modify/etc/X11/xf86config:
Add the following content to the keyboard section:
# Let the server do the numlock processing. This shoshould only be
# Required when using pre-R6 clients
Servernumlock