Shift-Ctrl M (to open Serial Monitor) inserts a carriage return in the editor.

I've never done much coding (well, really any coding) in Java, but I poked around in the source a bit, and it looks like an
event.consume()
would eat the keystroke before it got sent to the editor.

Just don't know where to put it.

Hmm.