Use digital pin,both as input and outpout,without always reconfiging the pinMode

TomGeorge. i know what you are talking about. but my worry, is that there actally be TWO "rocker switches" for each window... one the normal hardware button, and the other, a digital button on my pc screen... so i want to make sure, that it will not short-circuit anything if the pc buttons, and the hardware ones, are both pressed at the same time!!

but i see now, that becouse the relays take some time to de-energize, even if the arduino uses some logic, to detect if the hardware buttons are pressed, then there will still be a short-circuit, for some mS, (as much time the relay takes to close...)

so i think the only possible solution would be something like this :
connect the relays in a way, that it is "hard-wired" impossible for the 2 relays to be energized at the same time.... any idea how i could do that??