On the Duet support site a very good description and software for rebuilding a Chinese CNC-pendant for the Duet2wifi is available.
I used this description to program an arduino pro micro, and connect it to the pendant wired, place it inside the pendant and connected the pendant with 4 wires to the Duet. This works very well.
In the process, I developed some schematics that may be useful to you, available in this post:
Needed: an arduino pro micro and a pendant like this: