yes the Return (or Enter) key activates modular placement mode, that means that planks/beams/logs follow preexisting planks/beams/logs so that to perfectly align with them.
e.g. a beam will align on the surfaces of other beams (similarly for planks on planks and logs on logs)
a plank will align inside a beam with the wide side along its long side
a log will align inside a beam along its long side