def _event_filter_page_keypress(self, event):
key = event.key()<EOL>ctrl_down = self._control_key_down(event.modifiers())<EOL>alt_down = event.modifiers() & QtCore.Qt.AltModifier<EOL>if ctrl_down:<EOL><INDENT>if key == QtCore.Qt.Key_O:<EOL><INDENT>self._control.setFocus()<EOL>intercept = True<EOL><DEDENT><DEDENT>elif alt_down:<EOL><INDENT>if key == QtCore.Qt.Key_Greater:<EOL><INDENT>self._page_control.moveCursor(QtGui.QTextCursor.End)<EOL>intercepted = True<EOL><DEDENT>elif key == QtCore.Qt.Key_Less:<EOL><INDENT>self._page_control.moveCursor(QtGui.QTextCursor.Start)<EOL>intercepted = True<EOL><DEDENT><DEDENT>elif key in (QtCore.Qt.Key_Q, QtCore.Qt.Key_Escape):<EOL><INDENT>if self._splitter:<EOL><INDENT>self._page_control.hide()<EOL>self._control.setFocus()<EOL><DEDENT>else:<EOL><INDENT>self.layout().setCurrentWidget(self._control)<EOL><DEDENT>return True<EOL><DEDENT>elif key in (QtCore.Qt.Key_Enter, QtCore.Qt.Key_Return,<EOL>QtCore.Qt.Key_Tab):<EOL><INDENT>new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,<EOL>QtCore.Qt.Key_PageDown,<EOL>QtCore.Qt.NoModifier)<EOL>QtGui.qApp.sendEvent(self._page_control, new_event)<EOL>return True<EOL><DEDENT>elif key == QtCore.Qt.Key_Backspace:<EOL><INDENT>new_event = QtGui.QKeyEvent(QtCore.QEvent.KeyPress,<EOL>QtCore.Qt.Key_PageUp,<EOL>QtCore.Qt.NoModifier)<EOL>QtGui.qApp.sendEvent(self._page_control, new_event)<EOL>return True<EOL><DEDENT>return False<EOL>
Filter key events for the paging widget to create console-like
            interface.