def _do_home_key(self, event=None, select=False):
<EOL>min_column = self.indenter_mode.min_column<EOL>text = api.TextHelper(self).current_line_text()[min_column:]<EOL>indent = len(text) - len(text.lstrip())<EOL>delta = (self.textCursor().positionInBlock() - indent - min_column)<EOL>cursor = self.textCursor()<EOL>move = QtGui.QTextCursor.MoveAnchor<EOL>if select:<EOL><INDENT>move = QtGui.QTextCursor.KeepAnchor<EOL><DEDENT>if delta > <NUM_LIT:0>:<EOL><INDENT>cursor.movePosition(QtGui.QTextCursor.Left, move, delta)<EOL><DEDENT>else:<EOL><INDENT>cursor.movePosition(QtGui.QTextCursor.StartOfBlock, move)<EOL>cursor.movePosition(QtGui.QTextCursor.Right, cursor.MoveAnchor, min_column)<EOL><DEDENT>self.setTextCursor(cursor)<EOL>if event:<EOL><INDENT>event.accept()<EOL><DEDENT>
Performs home key action