Disable laptop keyboard when using external
Turn off automatic driver installation
1. Open Start Menu and type gpedit.msc.
2. Reach Computer Configuration->Administrative Templates->System->Device Installation->Device Installation Restrictions.
3. Search for Prevent installation of Devices not described by other policy settings. Right click on it.
4. Click on the Enable option, apply and save.
Uninstall the driver
1. Open Start Menu and type device manager.
2. Click to expand the Keyboards line. A list with the keyboards will appear.
3. Right-click on the internal keyboard and choose Uninstall.
4. Reboot your computer and the device driver will not install automatically and the internal keyboard will remain disabled.