code: def send_keys(pymux, variables):
      
      pane = pymux.arrangement.get_active_pane()
  
      if pane.display_scroll_buffer:
          raise CommandException('Cannot send keys. Pane is in copy mode.')
  
      for key in variables['<keys>']:
          # Translate key from pymux key to prompt_toolkit key.
          try:
              keys_sequence = pymux_key_to_prompt_toolkit_key_sequence(key)
          except ValueError:
              raise CommandException('Invalid key: %r' % (key, ))
  
          # Translate prompt_toolkit key to VT100 key.
          for k in keys_sequence:
              pane.process.write_key(k)
docs: Send key strokes to the active process.