Luciano
Luciano

Reputation: 1601

Capturing ESC key press over Telnet?

We've got an embedded application that responds to "Esc" press when we access it through Serial, but not when we access the board over Telnet.

There is data of some sort being sent, but it does not seem to correspond to our "Esc" key. (if we press ESC, then Enter we get "Unrecognized command" instead of a new prompt) I can't find any documentation on what gets sent when the "ESC" key is pressed in telnet.

Any ideas on how I capture this ESC key press?

Upvotes: 0

Views: 1566

Answers (3)

David Vereb
David Vereb

Reputation: 1848

I know you have your answer, but I was running into this issue and it wasn't the fault of the data flow path as yours was. I'll include it here in case someone else stumbles along this question in their search.

I was able to send the escape key with CTRL+3 (the number three), CTRL+[, or by pressing the escape key itself, but only after changing telnet's mode to character:

  1. Press telnet's escape sequence first (CTRL+], by default)
  2. Type mode character and press Enter to disable LINEMODE.

Now you should be able to send the escape sequence by using any of the three methods I previously mentioned (Escape key, CTRL+3, or CTRL+[).

Upvotes: 0

Luciano
Luciano

Reputation: 1601

FOUND IT: Not related to Telnet but where the ESC press was captured and Telnet not being on the flow path with the capture in our input library.

Upvotes: 0

NPE
NPE

Reputation: 500773

The Esc key generates the ASCII Escape character, which has the code 27 in decimal or 1B in hex.

Upvotes: 1

Related Questions