title: Python send control + Q then control + A (special keys)
body: <p>I need to send some special keystrokes and am unsure of how to do it.</p>
  
  <p>I need to send <kbd>Ctrl</kbd> + <kbd>Q</kbd> followed by <kbd>Ctrl</kbd> + <kbd>A</kbd> to a terminal (I'm using Paramiko).</p>
  
  <p>i have tried</p>
  
  <pre><code>shell = client.invoke_shell()
  
  shell.send(chr(10))
  time.sleep(5)
  shell.send(chr(13))
  
  shell.send('\x11')
  shell.send('\x01')
  
  print 'i tried'
  </code></pre>
  
  <p>I can see the two returns go in successfully, but then nothing, it doesnt quit the picocom
  (also to note i have it the wrong way round, its expecting ctrl+a, then ctrl+q)</p>
  
  <p>if it helps this is the device
  <a href="http://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/eesm/software/configuration/guide/4451_config.html#pgfId-1069760" rel="nofollow">http://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/eesm/software/configuration/guide/4451_config.html#pgfId-1069760</a></p>
  
  <p>as you can see at step 2</p>
  
  <pre><code>Step 2 Exit the session from the switch, press Ctrl-a and Ctrl-q from your keyboard:
  
  Switch# &lt;type ^a^q&gt;
  Thanks for using picocom
  Router#
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>i have tried \x01\x16\x11\n but this returns</p>
  
  <pre><code>Switch#
  Switch#
  *** baud: 9600
  *** flow: none
  *** parity: none
  *** databits: 8
  *** dtr: down
  
  Switch#
  </code></pre>
  
  <p>this looks like it could be another special command?</p>