Hello, I am working on several projects that require running cables into plastic project boxes, including potentially building some handheld USB joysticks. If I have a plastic case with a screw on lid, I can drill a hole where the two parts meet and run a USB cable through the hole. However, it can slide back and forth. What do I need to clamp the cable in place so it does not move. A grommet wouldn't help because it doesn't hold the cable in place. Maybe a grommet with hot glue on the inside of the case? I also thought of putting clamps on the inside and the outside but that would take up a lot of room and look bad. Any suggestions would be appreciated. My current joystick that I built had a panel mount USB port, but the cable kept getting disconnected when I was playing. I ended up removing the panel mount and running the cable through the large hole and tying a knot so it wouldn't come out, but it is still loose. I want a permanent cable solution that doesn't unplug from the joystick and looks nice.
Thanks!