Yes, it'll work. The
mouse module reports the primary touch on mobile, but on desktop it reports the state of the actual mouse.
Obviously if you use something like the tilt sensors (e.g.
key.axis("Tilt X")), well only mobile devices have those. On desktop these will always report 0. So you would need to design your game with some alternative input method in that case.