Disable PS/2 port service
As most laptops are internally connected through the PS/2 ports, you can also disable the service that controls this port and effectively disable the keyboard:
sudo sc config i8042prt start= disabled
To re-enable it, run:
sudo sc config i8042prt start= auto