ESC ESC ESC (translated from <escape> <escape> <escape>) runs the command keyboard-escape-quit (found in global-map), which is an interactive compiled Lisp function in ‘simple.el’.