my first iteration was actually tap E to open, and then if you hold it and walk through to the other side it closes it behind you
it worked but it was a little clunky. then i realized i had a spare button (alt) that was unused for doors and i could just use that instead and its way nicer, simpler, and more versatile