Num Lock
How can i automatically turn the num lock on to use the numeric keyboard without pressing all the times num lock?
Thanx in adv. |
Some BIOS have an option to do that
|
If you use KDE you can set this setting in the control center.
Start control center click Peripherals | Keyboard | Advanced Tab. Then click the "Turn on" radio button. |
What distro, and what window manager do you use?
Cool |
man setleds
u can add a command in your startup script (.bash_profile) are u just in text mode? the setleds command should help u here. not sure how to do this in X. :D |
You have to do two seperate things to get NumLock to work: the first for CommandLineInterface and the second for X. Both ways are outlined on my Webpage (click below) . And both ways are independent of which Window Manager/GUI you are using.
HTH |
for the console, I put this file in a /etc/rc.d/rcsysinit.d file, but you can probably throw it in your /etc/profile like what was said before.
for tty in /dev/tty[1-9]*; do setleds -D +num < $tty done I just found this one today on the lfs mailing list for turning on numlock when you start x: use a text editor to create a file called setnumlock.c that has this in it: #include <X11/extensions/XTest.h> #include <X11//keysym.h> int main(){ 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; } Then compile with: gcc -I/usr/X11R6/include -L/usr/X11R6/lib -o setnumlock setnumlock.c \ -lX11 -lXtst then you can move the setnumlock executable to any dir in you path (I put it in /usr/X11r6/bin), and place it in you ~/.xinitrc file I hopt that helps p.s.- Peebles... I didn't see a link to your web site :-( |
adam_boz: It's the "www" button on the bottom of the reply :D
|
hehe... my bad.
looks good! (especially the setnumlock method :-) |
All times are GMT -5. The time now is 10:03 AM. |