How to disable the built-in laptop keyboard in Windows

Sometimes you don't want your laptop keyboard to accept input. This is usually because you have an external keyboard plugged in, the built-in keyboard is broken, or you just want a better typing space with a full-size keyboard.