I got a giant foam enter key gadget with USB as a gift (search for "Big Enter" if you want to see what gadget I mean). My guess is that it will likely just be a keyboard where only the enter key is connected. As I don't trust these gadgets and I want to improve my knowledge about Linux devices and drivers, I was wondering how I could prevent this possible rubber ducky from issuing arbitrary key commands. I want to limit the allowed key presses to "Enter" only for all devices connected to a certain USB port on my system.
Would I need a custom kernel driver for this or are there other ways? systemctl or something?
Thanks for your advice :)