code: def pymux_key_to_prompt_toolkit_key_sequence(key):
      
      # Make the c- and m- prefixes case insensitive.
      if key.lower().startswith('m-c-'):
          key = 'M-C-' + key[4:]
      elif key.lower().startswith('c-'):
          key = 'C-' + key[2:]
      elif key.lower().startswith('m-'):
          key = 'M-' + key[2:]
  
      # Lookup key.
      try:
          return PYMUX_TO_PROMPT_TOOLKIT_KEYS[key]
      except KeyError:
          if len(key) == 1:
              return (key, )
          else:
              raise ValueError('Unknown key: %r' % (key, ))
docs: Turn a pymux description of a key. E.g.  "C-a" or "M-x" into a
      prompt-toolkit key sequence.
  
      Raises `ValueError` if the key is not known.