Results 1 to 8 of 8

Thread: Want Numlock always on

  1. #1
    Join Date
    May 2010
    Beans
    4

    Cool Want Numlock always on

    Hi

    How can I make my ubuntu to have the Numlock always on , All the time
    no matter what

    (there is a free utility for windows "numlocker")

    thanks

    j.r

  2. #2
    Join Date
    Aug 2006
    Beans
    581

    Re: Want Numlock always on

    Numlock is often a BIOS option.
    i7 4770K@3.9GHz / Corsair H100i / Asus Maximus VI Gene / 16GB Corsair Vengeance 2133 /
    2x Gainward GTX780 Ti / 500GB Samsung 840 Evo / 1TB 2.5" HDD / BeQuiet! 1kW/
    Aerocool Dead Silence / Dell U2713HM / Win10 / Ubuntu 16.10

  3. #3
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    2,641
    Distro
    Ubuntu Development Release

    Re: Want Numlock always on

    There is an app called 'numlockx' in the repositories. Install & add to startup applications. That should do what you want. I've had 2 Gigabyte MBs that did not have a numlock option in BIOS.

  4. #4
    Join Date
    Nov 2011
    Beans
    13

    Re: Want Numlock always on

    Ive been wondering the same thing, i dont have the option in BIOS ill look for numlockx hopefully that does the trick

    Thanks Yawell for starting the thread and thanks kurt18947 for the lead...

  5. #5
    Join Date
    May 2010
    Beans
    4

    Re: Want Numlock always on

    Hi

    I need solution to permanently have the numlock = on.
    not the BIOS, not at startup , all the time .
    Even if I will press NumLock, it's should stay on.

    For now I have written a script which run in loop forever and do this :

    #!/bin/sh
    while true
    do
    sleep 4
    numlockx on
    done


    If the keyboard lost the Numlock at any reason , it will restore it in maximum 4 seconds.

    Yaweli.


    Still , someone know better solution , from inside the Ubuntu keyboard driver
    I will appreciate it.

    Regards

  6. #6
    Join Date
    Oct 2009
    Location
    Scotland
    Beans
    217
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Want Numlock always on

    I sort-of remember how to do this but you'll need to experiment:

    Start with NumLock On

    open terminal

    Code:
    xev
    press some keys and you will see it show the key number for each (my NumLock key shows as 77).

    Code:
    xmodmap -e 'keycode 77 = NoSymbol'
    Then, if it works, add it to StartUp
    AMD Phenom Quad 9650, 8Gb RAM, (2 x 1) +(1 x 1.5)Tb HDDs; 64-bit Lucid (ʍoʃs ʎpooʃq ooʇ sɐʍ ʇı ʇnq ʎʇʇɐᴎ pǝıɹʇ I); Dual-boot Win XP Pro 32-bit (although mainly use WINE or VirtualBox). HP t5730 with 1GB RAM and 160GB HDD running xubuntu 10.10.

  7. #7
    Join Date
    May 2010
    Beans
    4

    Re: Want Numlock always on

    Hi

    blocking key 77 disable the the ALT keys for me. I suggest not to try it.
    it disable the ALT the CTRL and the SHIFTS

    yaweli

  8. #8
    Join Date
    Mar 2010
    Location
    Santa Rosa California
    Beans
    24
    Distro
    Ubuntu

    Re: Want Numlock always on

    Quote Originally Posted by yaweli View Post
    Hi

    blocking key 77 disable the the ALT keys for me. I suggest not to try it.
    it disable the ALT the CTRL and the SHIFTS

    yaweli
    You have to get the right keycodes, I remap all the keys in the keypad so they are fixed to what I want and cannot change.

    Store your current keymappings for reference:
    xmodmap -pke > xmodmap.conf

    Get all the keycodes for your keypad keys for your specific computer/keyboard with xev. Then you need a file with all the new mappings (usually called .Xmodmap). xmodmap is used to remap the keys:

    xmodmap .Xmodmap

    If the .Xmodmap file is in your home directory gdm may do this automatically for you. Here are my keycodes for my Dell desktop with a Asus USB keyboard:

    cat .Xmodmap

    clear Mod2
    ! Mod2 is NumLock

    keycode 87 = KP_1
    keycode 88 = KP_2
    keycode 89 = KP_3
    keycode 83 = KP_4
    keycode 84 = KP_5
    keycode 85 = KP_6
    keycode 79 = KP_7
    keycode 80 = KP_8
    keycode 81 = KP_9
    keycode 90 = KP_0
    keycode 91 = KP_Decimal
    keycode 106 = KP_Divide
    keycode 63 = KP_Multiply
    keycode 82 = KP_Subtract
    keycode 86 = KP_Add
    keycode 108 = KP_Enter

    remove Lock = Num_Lock
    keycode 77 = comma
    ! map the NumLock key to whatever you want

    By default the keypad keys are mapped to different symbols than the main keyboard keys with the same name. Some programs treat them the same, some don't. I map my keypad to use the same symbols as the main keyboard:

    clear Mod2
    ! Mod2 is NumLock

    keycode 87 = 1
    keycode 88 = 2
    keycode 89 = 3
    keycode 83 = 4
    keycode 84 = 5
    keycode 85 = 6
    keycode 79 = 7
    keycode 80 = 8
    keycode 81 = 9
    keycode 90 = 0
    keycode 91 = period
    keycode 106 = slash
    keycode 63 = asterisk
    keycode 82 = minus
    keycode 86 = plus
    keycode 108 = Return

    remove Lock = Num_Lock
    keycode 77 = comma

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •