How to disable and enable laptop keyboard. You can use xinput to float the input device under X.
- Execute the command
xinputlist to list your input devices. - Locate
AT Translated Set 2 keyboardand take note of itsidnumber; this will be used to disable the keyboard. Also, take note of the number at the end,[slave keyboard (#)]; this is theidnumber of the master, which will be used to re-enable your keyboard. - To disable the keyboard, execute the command
xinput float <id#>, where<id#>is your keyboard’s id number. For example, if theidwas10, then the command would bexinput float 10. - To re-enable the keyboard, execute the command
xinput reattach <id#> <master#>, wheremasteris that second number we noted down. So if the number was3, you would doxinput reattach 10 3.