0

I know I can send b'\x03' to send CTRL + C to Linux but I don't know the code for CTRL + \. What resource covers CTRL + <key>?

By way of background, I am writing a small test script that exercises my python asyncssh application and I am using ping as a way to prove out the function of the code. One of the tests I wanted to include was sending a command while ping was running and have the script read the intermediary statistic output. When you run ping localhost, you can send CTRL + \ in LINUX and this outputs 'N/N ... statistic summary: min/max... etc'. I send CTRL + C with b'\x03' just fine but can't figure out how to send CTRL + \. Any help?

Ulrich Eckhardt
  • 16,572
  • 3
  • 28
  • 55
nndhawan
  • 597
  • 6
  • 24
  • 1
    0x1c according https://en.wikipedia.org/wiki/ASCII#ASCII_control_code_chart – Gerald Mayr Jan 14 '22 at 10:54
  • Does this answer your question? [Sending ASCII Control codes with asyncssh](https://stackoverflow.com/questions/70718149/sending-ascii-control-codes-with-asyncssh) – Ulrich Eckhardt Jun 23 '22 at 15:03

0 Answers0