How to Disable Laptop Internal Keyboard in Ubuntu or Centos
Steps to disable laptop internal keyboard in ubuntu or Centos
Sometime our laptop internal keyboard some of keys don’t work and some keys active regularly so we have to disable internal keyboard and want to use external keyboard. Below are the steps to disable laptop internal keyboard in Ubuntu or Centos or linux Distros.
Xinput command is used to float input device of your laptop. So execute following command to list down internal devices –
linuxtweaks ~]#xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)] ⎜ ↳ Dell Dell USB Wired Entry Keyboard 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)] ↳ Sony Vaio Keys id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Dell Dell USB Wired Entry Keyboard id=10 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ↳ Sony Visual Communication Camer id=14 [slave keyboard (3)]
Now locate “AT Translated Set 2 keyboard” from the list and note down key value for the same.In my system it’s id is 12.
Also note down slave keyboard value in the same line which is now 3.
To disable the keyboard use following command.
linuxtweaks ~]#xinput float 12
After that when you list down your input devices it will shown as below
xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)] ⎜ ↳ Dell Dell USB Wired Entry Keyboard 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)] ↳ Sony Vaio Keys id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Dell Dell USB Wired Entry Keyboard id=10 [slave keyboard (3)] ↳ Sony Visual Communication Camer id=14 [slave keyboard (3)] ∼ AT Translated Set 2 keyboard id=12 [floating slave]
Sometime we need to disable internal keyboard on boot time and in above steps id value changes on reboot so we can use different step to disable keyboard. There is also another way to disable internal device/keybaord without knowing the id value.
linuxtweaks ~]#xinput disable "AT Translated Set 2 keyboard"
Above step also disable internal keyboard and you can directly use this command at boot time so no need to disable everytime when reboot.
We can also reattach the device using following command.
linuxtweaks ~]#xinput reattach 12 3 linuxtweaks ~]#xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)] ⎜ ↳ Dell Dell USB Wired Entry Keyboard 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)] ↳ Sony Vaio Keys id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Dell Dell USB Wired Entry Keyboard id=10 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] ↳ Sony Visual Communication Camer id=14 [slave keyboard (3)] Congrats you have disable laptop internal keyboard !!! To view more posts in this category please click here !!!