A couple of folks have done various implementations long those lines — I find it more straight-forward (on Windows) to just connect a gamepad and remap the buttons:
(but it’s not wireless — fwiw, I really don’t need another battery to manage the charging of in my life)