LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   x11 doesnt have num lock on (https://www.linuxquestions.org/questions/slackware-14/x11-doesnt-have-num-lock-on-689103/)

ninja master 12-08-2008 08:32 AM

x11 doesnt have num lock on
 
im getting tired of turning num lock on everytime i startx. is there a way to have it come on automatically?

ninja master 12-08-2008 08:44 AM

also the . on my number pad doesnt work under linux?

TSquaredF 12-08-2008 09:17 AM

http://slackbuilds.org/repository/12.1/system/numlockx/
Regards,
Bill

Woodsman 12-08-2008 12:22 PM

Yeah, there definitely is a strong bias against the Num Lock key in the 'nix world. :scratch:

Here is how I set the Num Lock for console mode (run from within rc.local):

Code:

# Turn numlock on:
# the following should match the number of consoles opened in /etc/inittab
# how many ttys are assigned in /etc/inittab?
 INITTY=/dev/tty[1-`grep -v "^# " /etc/inittab | grep -c "^c[0-9]:"`]
 for tty in $INITTY; do
# -v = verbose
#  /usr/bin/setleds -v -D +num < $tty
  /usr/bin/setleds -D +num < $tty
 done

For graphical mode, use one of the Num Lock programs as mentioned above.

Additionally, KDE supports Num Lock. Look in the Control Center, under Peripherals/Keyboard. KDE also supports Accessibility options to enable a low volume pip noise when the Num Lock key is toggled. Look in the Control Center, Regional & Accessibility, Accessibility, Locking Keys. Within KDE Num Lock and Caps Lock are considered locking keys. I don't know why Scroll Lock and Insert are not. They should be.

If you want Num Lock support with the kernel, you have to modify keyboard.c and recompile the kernel. Always irritated me that I set Num Lock in the BIOS and Linus toggled Num Lock off. Should be a boot parameter, not hard-coded.

Quote:

also the . on my number pad doesnt work under linux?
Temporarily disable Num Lock and check that the key acts as a Delete key. If not then the key might be dirty and not making contact.

mRgOBLIN 12-08-2008 06:43 PM

I have a ~/.Xmodmap file with the following.

Code:

keycode 79=7
keycode 80=8
keycode 81=9
keycode 83=4
keycode 84=5
keycode 85=6
keycode 87=1
keycode 88=2
keycode 89=3
keycode 90=0
keycode 91=period
keycode 157=KP_Enter

Assuming the keycodes match you'll be in permanent "Numlock=on" mode :)

ninja master 12-09-2008 04:34 AM

the key doesnt work as a period or a delete, the prog i installed didnt do much from slack builds. im using xfce.

i added an xmodmap, but what permissions does the file have? im gonna guess its a 755 kinda file.

ninja master 12-09-2008 04:42 AM

setleds +numlock works great, xfce is another story. whats the deal with nix being numb lock nazi's? i can see that being useful for a laptop that hijacks half of the keyboard for num lock, thats about it. i love num lock on my desktop =(

Woodsman 12-09-2008 05:50 PM

Start with some basics:

1. Test the Period/Delete key on a different computer.

2. Don't start X. Does the Period/Delete key work in console mode?

There is an X applet called xev. Run the program from the command line and press the Period/Delete key. You will see the keycode for the key.

ninja master 12-09-2008 06:27 PM

dont start x LOL silly thats what ctrl + alt + f2 is for =)

xev confirms that the period is shot on this keyboard, no worries, i have a clone of it 2 feet from me.

mRgOBLIN 12-09-2008 06:55 PM

Quote:

Originally Posted by ninja master (Post 3368910)

i added an xmodmap, but what permissions does the file have? im gonna guess its a 755 kinda file.

just has to be readable... look at ~/.xinitrc

Notice the period and uppercase X

Code:

usermodmap=$HOME/.Xmodmap
You can just type in "xmodmap .Xmodmap" to test it.

Oh another handy thing I do with it is disable the damned capslock key.

Code:

remove Lock = Caps_Lock


All times are GMT -5. The time now is 06:27 AM.