I wasn't joking: there's no good reason to disbable a laptop keyboard unless you have great eye sight. Ive hooked in different keyboards, and it was very dissapointing.
My cats are the reason. I might be using a laptop a bit longer. I don't want to buy a monitor. My cats routinely walk in front of or over whatever is in front of me. They consistently shove their heads into my palms demanding to be pet.
Further to the above, I will give you the rest so that you can accomplish this while we are both online and offline at different times.
First of all, as a precaution, it may be wise to launch your Virtual (on screen) Keyboard, so that if things go wrong, you can still have access to entering commands. Also, unplug or switch off your external keyboard, if you have one available.
You can do that from the Menu, with Settings - Preferences - Accessibility - Keyboard and move the toggle switch to On. To switch it off when you are finished, reverse the toggle switch, or on the virtual keyboard you can click an icon of a small keyboard near its top right.
Let's take a look at my xinput output above.
Under
⎣ Virtual core keyboard
I have two (2) entries for keyboard. Mine is actually the bottom one
↳ AT Translated Set 2 keyboard id=17
To temporarily disable my keyboard, I can type in either of
Code:
xinput disable 17
OR
xinput disable "AT Translated Set 2 keyboard"
My keyboard is then disabled for the duration of the computer session I am in, but will be re-enabled following a power down and restart or a reboot.
You could then reconnect your external keyboard and continue from there.
To re-enable the keyboard during the same session
Code:
xinput enable 17
OR
xinput enable "AT Translated Set 2 keyboard"
How to make this permanent?
Maarten's link to Baeldung in #6 gives some pointers, but I use a more complete method.
If you are using X11/Xorg (not Wayland), and you likely are on Mint, there is a file
libinput.conf
(on some distros, it will be synaptic.conf)
Full path is
/usr/share/X11/xorg.conf.d/40-libinput.conf
and we can edit that to make the changes and save it.
You can use the CLI Text Editor Nano in Terminal, or (as Root) the GUI Text Editor (xed for Mint), I use Nano.
My content is in the Spoiler below (click to open, click to close)
cat /usr/share/X11/xorg.conf.d/40-libinput.conf
# Match on all types of devices but joysticks
#
# If you want to configure your devices, do not copy this file.
# Instead, use a config snippet that contains something like this:
#
# Section "InputClass"
# Identifier "something or other"
# MatchDriver "libinput"
#
# MatchIsTouchpad "on"
# ... other Match directives ...
# Option "someoption" "value"
# EndSection
#
# This applies the option any libinput device also matched by the other
# directives. See the xorg.conf(5) man page for more info on
# matching devices.