How to disable Linux laptop keyboard when custom keyboard is plugged in

https://feddit.nl/post/49130941

How to disable Linux laptop keyboard when custom keyboard is plugged in - feddit.nl

How are you guys doing this? Are you using Sway or Hyprland for this? Anyone else using udev already?

Personally? I just open up the laptop and disconnect the keyboard header. Of course, this only works if you only ever use a USB keyboard with the laptop, but thought I’d add it as a valid method.
Seems like a silly solution but so just use evtest to disable the keyboard. Did a tiny bash script to disable and re-enable the keyboard by just tracking the pid

I used to do this on my touchscreen laptop, key combo to disable and 4 finger swipe to re-enable.

Wrote a small script that used xinput, ran the script as above.