Disabling the laptop keyboard in ubuntu 20.0.4

This is common problem we face during lockdown where keyboard starts to start working by its own. We need to disable the connected device and use only the external keyboard. The first command to list the input devices

xinput –list

listing the inputs

the one that we need is

our keyboard device where id is 16

In order to disable the keyboard run the following command

xinput set-int-prop 16 "Device Enabled" 8 0

where 16 is the id for the input device

In order to enable the keyboard back on run the following command

xinput set-int-prop 16 “Device Enabled” 8 1

Long term

In case of on start locking up we need to change the grub file

vi /etc/default/grub

try opening with sudo command for write mode.

grub file

check for this line

replace with following code

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash i8042.nokbd”

and then update the grub with command

update-grub2

After this we dont need to disable keyboard again.

# follow the guide with video

Disabling the code

view keycodes first

xev -event keyboard

after checking keycode

xmodmap -e ‘keycode 81=~’

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store