This is already a feature, no extra key presses/holding necessary. You can hold/repeat wait and there is an automatic block if a hostile comes into view, so that it's safe to do so. Note that depending on the enemy's speed you may still get attacked once (first) when they come into view, because waiting takes a full turn.