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.

  • Your solution should work, what kind of errors do you get on startup? – Mike May 18 '16 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. – user3294195 May 18 '16 at 14:56
7

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".

  • 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. – Manuel J. Diaz Jun 18 '17 at 17:33
5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.