def enable_insert_mode(self):
        """Assign insert mode behaviour to event handling."""
        ### change mode to insert mode by assigning the
        ### respective handle_input behaviour
        self.handle_input = self.insert_mode_handling

        ### indicate the insert mode in the statusbar
        self.te.statusbar.set("-- INSERT --")

        ### if app is not in play mode, enable text editing events
        ### and set the text input rect

        if GENERAL_NS.mode_name != 'play':

            start_text_input()

            text_input_rect = EDITING_AREA_RECT.copy()
            text_input_rect.height = 20
            text_input_rect.top = EDITING_AREA_RECT.bottom
            set_text_input_rect(text_input_rect)
Assign insert mode behaviour to event handling.
nodezator/textman/editor/cursor/op.py