Is it possible to code a DPDT switch?

OK I'll look into trying that