Numlock

Paul Morgan paul.morgan at jumanjihouse.com
Tue Sep 16 22:51:55 UTC 2003


On Tue, 2003-09-16 at 17:24, Jim Cornette wrote:
> > The kernel is hard coded to disable numlock on startup.  Years
> > back when this annoyed me as I wanted numlock to default to the
> > BIOS defined setting as well, I was told on the linux-kernel
> > mailing list that the kernel defaulted to disabling numlock so
> > that Linus' laptop came up ready to type, rather than having 
> > numlock enabled and having to turn it off in order to type.
> 
> Since laptops are becoming more common, I think that numlocks off is the 
> best default setting. Also, for a left-handed person, as myself, the 
> numbers pad is not frequently used. I like the setting off.
> 
> If you are doing a lot of working with numbers, it is not too dificult 
> to hit the numlock key. For a laptop user, with combo keys, they would 
> be typing things like 150 for jim and 35n4x for linux. It is more sane 
> to keep the option set to off.
> 
> Jim (n6t 150)

My 2 cents:

Your point about the laptop is a good argument against defaulting
numlock to the "on" position. Nevertheless, that is still preventing the
user/owner of the computer from making the determination. 

The best method is to have a config file setting, such as
numlock=on|off|bios IMHO.

Where could this setting be located? 

inittab? this might necessitate additional syntax of some sort to
distinguish between setting the led's in the various run-levels &/or
VC's.

rc.local script? 

XF86Config? initial setting would apply to all users until overridden by
~/.dmrc 

.dmrc? 

some combination/hierarchy?

xset is not appropriate for this, I believe, because of the variation in
how the led's are interpreted from one machine to another. On my Sony
Z1A laptop, for instance, the only led that can be controlled by xset is
the scroll-lock (xset led 3). The other values 1-32 have no discernible
effect:

#!/bin/sh
i=1
while [ $i -lt  33 ]
do
  echo "Trying LED $i"
  xset led $i
  sleep 2
  xset -led $i
  i=$(( $i+1 ))
done

-paul







More information about the fedora-test-list mailing list