In Rstudio, as pointed out in for example this answer, Esc is used to abort when the console is awaiting further input (marking a new line with a + r
+