One TTL (RX, TX) port to both half duplex RS485 and RS232 at the same time?

In my project, I need to convert a TTL serial port to RS485 and RS232. At the moment, I am thinking of using MAX232 and MAX485 chip at the same time while using two jumpers switch to change TTL TX and RX towards either MAX232 or MAX485 for RS232 or RS485 output. But it will requires user to open the enclosure to set the jumper pin. Is it possible to have both RS485 and RS232 mode working at the same time (of course on different output pins on DB9 connector)? If so, how to realize such design. If not, how to realize the change of mode through software?
Thanks!

Max 485 has a shutdown pin which would make this trivial. However MAX232 does not. I am sure you could find a substitute with a shutdown / hi-z pin. If not you could power it from an arduino pin and switch it off when not needed. You would also need two diodes and pull downs to isolate inputs / outputs. It looks to me like it would work. Or you could use a CMOS buffer with hi-z function to isolate. Or even a 4066 switch.

Thanks for the reply. So the shutdown and isolation is the key.

You could bring the Rx signal from RS232 and RS485 thru 74HC125 buffer, enable one or the other for receiving.

MAX222 has shutdown.

Not shutdownso much, really want the MAX222's RX output enable feature.