Pressing enter twice, double tab, double return, shift-enter, escape key. None of these work on the Mac and there is currently no way to move the focus from the text entry box, whether it is layer name, component name or any other field box. This means that if your next keyboard press is a shortcut then you will rename the text. Despite knowing this for years, it still catches me out and I find layers titled with a space and have to spend time fixing my error to avoid enormous difficulty down the line or within Layout.
What frustrates me most is that this is an easy and quick fix for the coders and a simple check box in the general preferences would allow users to amend the apps behaviour. There is certainly no shortage of comments and desire for such a simple amendment.