def send_string(self, string: str):
if not string:<EOL><INDENT>return<EOL><DEDENT>string = string.replace('<STR_LIT:\n>', "<STR_LIT>")<EOL>string = string.replace('<STR_LIT:\t>', "<STR_LIT>")<EOL>_logger.debug("<STR_LIT>")<EOL>self.__clearModifiers()<EOL>modifiers = []<EOL>for section in KEY_SPLIT_RE.split(string):<EOL><INDENT>if len(section) > <NUM_LIT:0>:<EOL><INDENT>if Key.is_key(section[:-<NUM_LIT:1>]) and section[-<NUM_LIT:1>] == '<STR_LIT:+>' and section[:-<NUM_LIT:1>] in MODIFIERS:<EOL><INDENT>modifiers.append(section[:-<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>if len(modifiers) > <NUM_LIT:0>:<EOL><INDENT>if Key.is_key(section):<EOL><INDENT>self.interface.send_modified_key(section, modifiers)<EOL>modifiers = []<EOL><DEDENT>else:<EOL><INDENT>self.interface.send_modified_key(section[<NUM_LIT:0>], modifiers)<EOL>if len(section) > <NUM_LIT:1>:<EOL><INDENT>self.interface.send_string(section[<NUM_LIT:1>:])<EOL><DEDENT>modifiers = []<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if Key.is_key(section):<EOL><INDENT>self.interface.send_key(section)<EOL><DEDENT>else:<EOL><INDENT>self.interface.send_string(section)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>self.__reapplyModifiers()<EOL>
Sends the given string for output.