Last active
December 4, 2024 12:12
-
-
Save mihir-kumar-thakur/b0c97aacfb980e8f5172a807fe82a36f to your computer and use it in GitHub Desktop.
Revisions
-
mihir-kumar-thakur revised this gist
Jun 21, 2020 . 1 changed file with 54 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,23 +1,54 @@ Disable Laptop Keyboard in Ubuntu Taken From :- https://blog.hostonnet.com/laptop-keyboard-ubuntu To disable laptop built in keyboard in Ubuntu, first you need to identify the device id for keyboard. Now run xinput –list command to get list of all input devices hostonnet@pc4:~$ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [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)] ↳ Power Button id=8 [slave keyboard (3)] ↳ HP Truevision HD id=9 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)] ↳ HP WMI hotkeys id=12 [slave keyboard (3)] ↳ HP Wireless hotkeys id=13 [slave keyboard (3)] hostonnet@pc4:~$ xinput command should be run as user that run the GUI (Ubuntu logged in user). The one above list what we need is ↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)] The ID is 10. To disable the keyboard, run xinput set-int-prop 10 "Device Enabled" 8 0 To enable it, run xinput set-int-prop 10 "Device Enabled" 8 1 Method 2: Disabling on Boot Edit file /etc/default/grub vi /etc/default/grub Find GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" Replace it with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd" Regenerate grub.cfg with update-grub2 Reboot Laptop, Built in keyboard will be disabled by default. No need to run xinput command and manually disable each time. -
mihir-kumar-thakur created this gist
Jun 21, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ Disabling Keyboard on Boot 1. To disable laptop built in keyboard in Ubuntu, first you need to identify the device id for keyboard. ``` xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ MOSART Semi. 2.4G INPUT DEVICE Mouse id=9 [slave pointer (2)] ⎜ ↳ MOSART Semi. 2.4G INPUT DEVICE Consumer Control id=10 [slave pointer (2)] ⎜ ↳ AlpsPS/2 ALPS DualPoint Stick id=14 [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)] ↳ MOSART Semi. 2.4G INPUT DEVICE id=8 [slave keyboard (3)] ↳ MOSART Semi. 2.4G INPUT DEVICE System Control id=11 [slave keyboard (3)] ↳ Integrated Camera: Integrated C id=12 [slave keyboard (3)] ↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)] ↳ MOSART Semi. 2.4G INPUT DEVICE Consumer Control id=16 [slave keyboard (3)] ∼ AlpsPS/2 ALPS DualPoint TouchPad id=13 [floating slave] ```