def on_tab(self, event):
        '''Special handling for the tab key
        
        Lots of things are going on here. We might move to the next
        cell, or we add indentation based on the previous line, or add
        a new column to the current row.
        '''
        if self.complete_frame.winfo_viewable():
            self.complete_frame.place_forget()

        # are we in a variable? If so, move to just outside the variable
        line = self.get("insert linestart", "insert")
        if re.search(r'[\$@]{[^}]*$', line):
            index = self.search("} *", "insert", regexp=True,
                                stopindex="insert lineend", count=self.tmpvar)
            if index != "":
                self.mark_set("insert", (index, self.tmpvar.get()) % "%s+%sc")
                return "break"

        # are we at the beginning of a blank line? If so, add indentation
        # equal to the previous line
        if (self.compare("insert",">","1.0") and
            self.compare("insert", "==", "insert linestart")  and
            self.compare("insert", "==", "insert lineend")):
            previous_line = self.get("insert -1 line linestart", "insert -1 line lineend")
            match = re.match(r'^([ |.]+)', previous_line)
            if match:
                self.insert("insert", match.group(1))
                return "break"

        # Or, we might want to add a new column based
        if self._should_add_new_column():
            self.insert("insert", " | ")
            return "break"
        else:
            self.move_to_next_column()
        return "break"
dataset/ETHPy150Open boakley/robotframework-workbench/rwb/widgets/dte.py/DynamicTableEditor.on_tab/swapped operands of `%`