code: def type(self, text, delay=0.1):
          
          in_special_code = False
          special_code = ""
          modifier_held = False
          modifier_stuck = False
          modifier_codes = []
  
          for i in range(0, len(text)):
              if text[i] == "{":
                  in_special_code = True
              elif in_special_code and (text[i] == "}" or text[i] == " " or i == len(text)-1):
                  in_special_code = False
                  if special_code in self._SPECIAL_KEYCODES.keys():
                      # Found a special code
                      keyboard.press_and_release(self._SPECIAL_KEYCODES[special_code])
                  else:
                      # Wasn't a special code, just treat it as keystrokes
                      keyboard.press(self._SPECIAL_KEYCODES["SHIFT"])
                      keyboard.press_and_release(self._UPPERCASE_KEYCODES["{"])
                      keyboard.release(self._SPECIAL_KEYCODES["SHIFT"])
                      # Release the rest of the keys normally
                      self.type(special_code)
                      self.type(text[i])
                  special_code = ""
              elif in_special_code:
                  special_code += text[i]
              elif text[i] in self._REGULAR_KEYCODES.keys():
                  keyboard.press(self._REGULAR_KEYCODES[text[i]])
                  keyboard.release(self._REGULAR_KEYCODES[text[i]])
              elif text[i] in self._UPPERCASE_KEYCODES.keys():
                  keyboard.press(self._SPECIAL_KEYCODES["SHIFT"])
                  keyboard.press_and_release(self._UPPERCASE_KEYCODES[text[i]])
                  keyboard.release(self._SPECIAL_KEYCODES["SHIFT"])
              if delay and not in_special_code:
                  time.sleep(delay)
docs: Translates a string into a series of keystrokes.
  
          Respects Sikuli special codes, like "{ENTER}".