Escape character is '^]'.

How does one type that? On Finnish/Swedish keyboard Alt-9 is ], but Ctrl-Alt-9 gives just 9.

(For non-scandinavians, [] and {} are Alt-8/9 and Shift-Alt-8/9 respectively in SE/FI keyboard)


3 Answers 3


I enabled the Finnish and Swedish keyboard layouts and experimented with Terminal on OS X 10.8.5 a bit…

  • Control-å generated ^] (U+001D)
    å (LATIN SMALL LETTER A WITH RING ABOVE) is an unmodified key in these layouts.
    It is located where [ (LEFT SQUARE BRACKET) is with US layouts.

  • Control-ä generated ^[ (U+001B)
    ä (LATIN SMALL LETTER A WITH DIAERESIS) is an unmodified key in these layouts.
    It is located where ' (APOSTROPHE) is with US layouts.

  • Control-- generated ^_ (U+001F)
    - (HYPEN-MINUS) is an unmodified key in these layouts.
    It is located where / (SOLIDUS, a.k.a. “forward slash”) is with US layouts.

As normal, Control-Space generated ^@ (U+0000) and Delete generated ^? (U+007F).

I did not find any combination that generated ^\ (U+001C) or ^^ (U+001E) in Terminal though. There may be other combinations that work in other terminal emulators though (e.g. iTerm 2 in its default configuration arranges for Control with 28 generate the “non-alphabetic” control characters; this is similar to how xterm works).

  • ^[ is the same as ESC, which can be generated more simply with the Escape key.
    – Barmar
    Jun 28, 2022 at 0:52

You can run telnet with a different escape char using telnet -e.

For instance, to use control A, type telnet -e ^A.

You may also create a file ~/.telnetrc with this contents:

   set escape ^A

In both cases ^A is ^ followed by A, not control A typed directly.

  • Any idea what those proper settings might be? (No manual entry for telnetrc)
    – Kimvais
    Oct 25, 2013 at 12:14
  • man telnet says that it's the same as when using telnet in interactive mode: set escape ^A.
    – lhf
    Oct 25, 2013 at 12:15
  • does not work for me...
    – Kimvais
    Oct 25, 2013 at 12:20
  • See my edited answer.
    – lhf
    Oct 25, 2013 at 12:29

Just type 'quit' then press 'Return' button.

  • 1
    You can't type quit until you enter the escape character.
    – Barmar
    Jun 28, 2022 at 0:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .