title: How to send shift key to a console using pyserial
body: <p>I'm new to python and i'm connecting to a device using <strong>pyserial</strong> so, my question is:</p>
  
  <p>1-Is there a way for me to send the <strong>shift</strong> keyboard key event to the device? i tried searching almost everything but haven't find a solution, thanks for the help.</p>
  
  <p>Bellow is the code i'm working on, sorry for any discrepancies on my code (o_0)</p>
  
  <pre><code>import serial
  import time
  import serial.tools.list_ports
  
  
  comlist = serial.tools.list_ports.comports()
  
  connected = []
  
  for ports in comlist:
  connected.append(ports.device)
  
  print("All ports on this Computer are: " + 
  str(connected))
  console = serial.Serial(ports[0])
  
  while 1:
      console.write(b'+')
      time.sleep(0.2)
      console.write(b'1')
      time.sleep(0.2)
  
  def read_from_console(console):
      bytes_to_be_read = console.inWaiting()
  
      while True:
          if bytes_to_be_read:
              output = 
  console.read(bytes_to_be_read)
              return output.decode()
          else:
              return False
  read_from_console(console)
  </code></pre>