Want to disable the laptop with the keyboard (Ubuntu) as long as 2 commands.
1. Open the terminal and enter:
xinput list
? Virtual core pointer id=2 [master pointer (3)]? ? Virtual core XTEST pointer id=4 [slave pointer (2)]? ? HID Keyboard Device id=12 [slave pointer (2)]? ? G-tech Wireless Dongle id=14 [slave pointer (2)]? ? ETPS/2 Elantech Touchpad id=16 [slave pointer (2)]? Virtual core keyboard id=3 [Master keyboard (2)]? Virtual Core XTEST keyboard id=5 [slave keyboard (3)]? Power Button id=6 [slave keyboard (3)]? Video Bus id=7 [slave keyboard (3)]? Video Bus id=8 [slave keyboard (3)]? Power Button id=9 [slave keyboard (3)]? Sleep Button id=10 [slave keyboard (3)]? HID Keyboard Device id=11 [Slave Keyboard (3)]? G-tech Wireless Dongle id=13 [slave keyboard (3)]? At translated Set 2 keyboard id=15 [slave keyboard (3)]? MSI WMI hotkeys id=17 [slave keyboard (3)]
Unplug the external keyboard and use the exclusion method to find the notebook with its own keyboard. My notebook keyboard is an at translated Set 2 keyboard with ID 15.
2. Enter:
xinput set-prop 15 "Device Enabled" 0
The 15 in the code refers to the ID of my notebook keyboard, and you replace it with the ID of the device you want to disable.
Disable notebook with keyboard under Ubuntu