Disable laptop keyboard?

Hello . . . I have recently installed aurora onto my laptop,and I would like to know how to disable my laptop keyboard.

My laptop keyboard is broken,and occasionally types random characters. I have an external keyboard, but I cant put it ontop of my laptop because that types on my laptop keyboard aswell. I do not have anywhere else to put it making it hard to type things on my laptop. . .

Does anybody know how to disable the internal keyboard? I tried a script (manage-kwin-input-devices) but it did not work,even on root. I cannot find anything else online to disable the keyboard, please help.

Might be better to post in the Fedora forums since your question is probably more generically Fedora. Sorry couldn’t be more help. IDK on your question.

If you’re okay with disabling it persistently, and not with a script to easily enable/disable it on demand, you can set up a udev rule to not treat the device as an input at all.

Find the 1234:5678 device ID of your keyboard with sudo libinput list-devices.

$ sudo libinput list-devices

[...]

Device:                  ThinkPad Extra Buttons                                             
Kernel:                  /dev/input/event7
Id:                      host:17aa:5054       
Group:                   10                                                                 
Seat:                    seat0, default   
Capabilities:            keyboard

[...]

This is not really a keyboard but imagine it is. The device ID is on the Id: line and is here 17aa:5054.

Create a file containing the following and save it as /etc/udev/rules.d/99-disable-keyboard.rules:

ACTION!="remove", KERNEL=="event[0-9]*", \
   ENV{ID_VENDOR_ID}=="17aa", \
   ENV{ID_MODEL_ID}=="5054", \
   ENV{ID_INPUT}=""

…replacing the 17aa and 5054 to match your device. I believe the indentation of the ENV lines is required.

Then re-read the rules and apply them.

sudo udevadm control --reload
sudo udevadm trigger

If it doesn’t work, check the systemd journal for errors. Perhaps there’s a syntax error in the .rules file?

journalctl -n500

If everything seems okay, just restart the machine in case a reboot was required. I don’t know enough to say if it should be.