Custom Gamepad from scratch - DIY Project?

I’ve found this from an older post. But this method uses websockets. I need to configure some offline controller instead. Only for windows, mac or linux apps.