Announcement

Collapse
No announcement yet.

num lock

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    num lock

    trying to get a sensible setting for "num lock" on boot. Using an MS wireless keyboard with "F Lock", "num Lock" and "Caps" lights on receiver.

    Would like to have "num Lock" light on receiver "on" so that I can easily confirm status without having to remember to manually hit "num lock" every boot.

    My setting and what happens:
    • have BIOS turn on, and KDE to turn on - BIOS action turns light on, Linux boot then leaves the BIOS setting alone and KDE toggles it's num lock off, but light stays on but KDE "interprets" keystrokes as cursor keys - thus "reversing" action of light on receiver
    • have BIOS turn it on and KDE to leave unchanged - BIOS action turns light on, Linux boot then turns num lock off turning light off and KDE leaves it off, have to remember to manually hit "num lock" key
    • have BIOS turn it off and KDE to turn on - BIOS action leaves light off, Linux boot leaves it unchanged and KDE turns it on and light stays off, but KDE "interprets" keys as numeric, thus reversing action of light on receiver


    It seems that Linux boot and KDE are at odds with each other. BIOS and Linux boot both affect the receiver light in conjunction with the keystroke sent to whatever routine interprets keystrokes. But KDE seems to keep it's own status of the "num lock" key instead of setting the h/w status or whatever.

    If I could get the Linux boot to just leave the "num Lock" status alone, thenm BIOS could turn "num lock" on and I could have KDE leave it unchanged and the receiver light and the status would agree.

    How do I get the Linux boot to leave the "num Lock" status alone??

    By Linux boot, I mean that time from when Grub loads the kernal and the sign in screen appears. Maybe The X window routines are doing this?? If it's X windows, can I tell that s/w to leave num lock status alone and if I can, how?

    #2
    Re: num lock

    From the KDE menu, select System -> KControl Center - > Peripherals -> Keyboard.
    The next brick house on the left
    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



    Comment


      #3
      Re: num lock

      Originally posted by jglen490
      From the KDE menu, select System -> KControl Center - > Peripherals -> Keyboard.
      That what I've been doing and how I told KDE to leave num lock alone.

      That ONLY controls KDE and does nothing for the Linux boot.

      How do I control the Linux boot and keep it from turning off "num lock"

      The boot process TOTALLY insists on turning off num lock. It does it once. I hit num lock and turn it back on. It then turns it off again before bringing up the login screen.

      I have no idea why it does that or what somebody was trying to accomplish in doing so. If I have BIOS turn num lock off, then the Linux boot process leaves it alone, so it isn't toggling the num lock status.

      Why does the Linux boot process INSIST on turning off num lock Just makes no sense to me.

      Is there anybody I can ask about that??

      Comment


        #4
        Re: num lock

        * Activating Numlock during boot time

        Place this in in your /etc/rc.d/rc2.d as a separate script to activate Numlock for the first six terminals. Don't forget to make it executable:

        Code:
        echo "Activating Numlock ..."
        for i in 1 2 3 4 5 6; do
        /usr/bin/setleds +num < /dev/tty${i} > /dev/null
        done
        Now you just have to update your rc levels:

        Code:
        sudo update-rc.d
        NOTE: I've never had the problem you are having and therefore haven't tried the above!
        Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

        Comment


          #5
          Re: num lock

          Originally posted by toad
          * Activating Numlock during boot time

          Place this in in your /etc/rc.d/rc2.d as a separate script to activate Numlock for the first six terminals. Don't forget to make it executable:

          Code:
          echo "Activating Numlock ..."
          for i in 1 2 3 4 5 6; do
          /usr/bin/setleds +num < /dev/tty${i} > /dev/null
          done
          Now you just have to update your rc levels:

          Code:
          sudo update-rc.d
          NOTE: I've never had the problem you are having and therefore haven't tried the above!
          Thank You - we're getting closer. That tells me how to turn 'num lock' on, or at least the LED.

          Now how do I stop it being done.

          I looked in all of the scripts in rcx.d and couldn't find anything that looked like it was turning 'num lock' on.

          Comment


            #6
            Re: num lock

            You could try the above with "-num"
            Once your problem is solved please mark the topic of the first post as SOLVED so others know and can benefit from your experience! / FAQ

            Comment


              #7
              Re: num lock

              Originally posted by toad
              You could try the above with "-num"
              Played with the 'setleds' command - it 'might' work except that it has no effect on the leds on the MS wireless receiver.

              If I could just find out why the Linux boot process insists that the 'num lock' be turned off and change that to turning it on or leaving it alone, the the MS receiver leds could be made to agree with the actual status.

              Comment


                #8
                Re: num lock

                searched the rc files - actually the files in /etc/init.d, which the files in /etc/rcx.d are links to.

                Found one, "console-screen.sh" that runs the 'setleds' command for all of the tty's as

                if [ "$LEDS" != "" ]
                then
                i=1
                while [ $i -le $NUM_CONSOLES ]
                do
                setleds -D $LEDS < $DEVICE_PREFIX$i
                i=$(($i + 1))
                done
                fi

                Commented out the commands, saved and rebooted.

                No effect.

                So it doesn't seem to be in the boot files per se, but maybe something hard coded into the Linux kernel that gets executed at boot time or something hard coded in the boot process.

                Strange.

                Comment

                Working...
                X