-2

I just installed ubuntu 22.04 on Thinkpad and the numlock key on numeric keypad is not working, as in the second function of the keys is always on (directional arrows, page up and down, etc The keys on the pad without second function work i.e.: /*-+

Online tips show a toggle access in Settings > Accessibility but i don't have that option listed, any suggestions?

Thanks

Screenshot of Accessibility Menu

Julie
  • 1

2 Answers2

0

You should be able to go into your BIOS and set an option to boot with NumLock on. Otherwise, you have a couple options:

Option 1

Run the following command to set GNOME to remember the NumLock state between boots:

gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state true

Option 2

Install the numlockx package.

sudo apt install numlockx

Then setup a Startup Application with numlockx on. See here for details.

Open Startup Applications via the Activities overview. Alternatively you can press Alt+F2 and run the gnome-session-properties command.

Click Add and enter the command to be executed at login (name and comment are optional). For example, to make Firefox start automatically, it's sufficient to type firefox in the Command field and confirm with Add.

mpboden
  • 1,389
  • Hello, Thank you for your answer, unfortunately I tried these 2 options and still have the issue. It seems that the numlock key doesn't work at all, maybe I need a new keyboard driver? but I wouldn't know how to do that – Julie Jun 14 '23 at 12:46
0

OK so I've dug some more and out of curiosity exported my gsettings using this tuto: Bash one-liner to display ALL `gsettings` in GUI dialog window

I copy-pasted the results into a txt file and CTRL+f for numlock and found: org.gnome.desktop.peripherals.keyboard numlock-state false org.gnome.desktop.peripherals.keyboard remember-numlock-state true

So I tried to adapt the command:

gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state true

to

gsettings set org.gnome.desktop.peripherals.keyboard numlock-state true

rebooted, and... 123456789/*-+ .0

:)

Now the numlock is still not working (ie numlock is now stuck on) which is no big deal, but out of curiosity anyone knows how to fix it? (i'm new to posting here so happy to create a new post if it's the way to do it, just let me know please)

Note, i'm not sure it's not a physical problem with the key - as laptop is hand-down and second-hand refurbished. I've been looking for a way to test the key but no luck yet, if anyone can advise on this?

Thanks again !

Julie
  • 1