10

As the title suggests, I'm looking for a way to turn NumLock on and disable the NumLock key permanently. There is a solution here: https://help.ubuntu.com/community/NumLock, but I've not been able to find the "keyboard layout options" menu in Ubuntu 16.04 (there's only "Keyboard" and "Text Entry" in System Settings). The other thing I've tried is add the following commands to Startup Applications:

numlockx on && xmodmap -e "keycode 77 = """

This does not work either, and causes errors on startup. Is there a nice clean way to get this done?

Thanks.

2
  • Your solution should work, what kind of errors do you get on startup?
    – Mike
    May 18, 2016 at 8:15
  • The exact command I use in Startup Applications is numlockx on && xmodmap -e "keycode 77 = """. There is no error anymore (not sure why), and NumLock is on at login, but the NumLock key is not disabled. May 18, 2016 at 14:56

4 Answers 4

9

After a bit of searching, I seem to have found a solution - Install "Gnome tweak tools" and under Typing-->Miscellaneous Compatibility Options, set "Numeric keypad keys always enter digits".

2
  • This has caused me issues on log-on screens on several machines, probably due to strange encoding issues. However, adding the line to the greeter file, as @YaTaras has in his answer, works reliably for Ubuntu 14.04, 16.04, and up. Jun 18, 2017 at 17:33
  • That worked well! For now its name is "Gnome Tweaks" (not tools)
    – Liker777
    Jan 30, 2020 at 18:25
4

Use

xmodmap -e 'keycode 77 = NoSymbol Num_Lock'

in Startup Applications, this worked for me best, no need for numlockx on as it should be on by default.

3

I've made to turn on numlock automatically after system booting up with adding this line: greeter-setup-script=/usr/bin/numlockx on to the file /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf See more here: Enable Numlock on Login

0

Ubuntu 22.04

You can use gsettings and tell Gnome to remember the NumLock state by executing this from the terminal:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .