Numlock and 87-TKL Keyboards

Summary

Most 87-key TKL keyboards don’t have numlock. But at least one does: the Unicomp Mini-M. Even though I almost never use numlock, it’s nice to have. When enabled on the Mini-M, the 7-8-9, u-i-o, j-k-l, m,,,. keys become the numpad. That means you can’t type. So it’s a nice feature only as long as it doesn’t get in the way.

But it does get in the way! The system boots up, you enter your password and login fails. Then you look at the keyboard and see that you typed in a bunch of garbage because numlock was on. We need a way to reverse the default and turn numlock off. This requires several config changes.

BIOS

Boot into the system BIOS, search through the menus and you’ll find a setting for the default numlock state. Turn it off.

Linux Settings

On Linux you have a few more changes to make. First, install the numlockx utility:

sudo apt install numlockx

Next, edit file /etc/default/numlockx to set the default state. Edit this file and set the last line to “keep” mode.

# Configuration file for numlockx

# State of numlog on start of X session
# Accepts following options:
#  auto - turns numlock on unless ran on laptop
#  on - turns numlock on
#  off - turns numlock off
#  keep - does not change numlock state
#  toggle - toggles numlock state
NUMLOCK=keep

Next, list the directory /usr/share/lightdm/lightdm.conf.d and check if there is a file called 50-xubuntu-numlock.conf. If there is, edit it. If there is not, create it. Make it look like this:

[Seat:*]
greeter-setup-script=/usr/bin/numlockx off

The above should be sufficient for the system to never enable numlock. But just to be safe, you can also edit your .profile file and add a command to disable numlock.

# turn off numlock
numlockx off