On Mac OS X, press ENTER instead of F2.
See also: "Working with the Edit Mode" > "Editing label text" in the yEd Graph Editor online manual.