diff --git a/consolegui/application/Box.py b/consolegui/application/Box.py index 8070046..c2437bf 100755 --- a/consolegui/application/Box.py +++ b/consolegui/application/Box.py @@ -459,3 +459,9 @@ class MainWgt(QtGui.QMainWindow): return 0 else: return 1 + + def keyPressEvent(self, e): + if e.key() == QtCore.Qt.Key_Return: + self.control_button.keyPressEvent(e) + else: + QtGui.QTabWidget.keyPressEvent(self, e) \ No newline at end of file diff --git a/consolegui/application/ConnectionTabs.py b/consolegui/application/ConnectionTabs.py index 98b5202..9277106 100644 --- a/consolegui/application/ConnectionTabs.py +++ b/consolegui/application/ConnectionTabs.py @@ -503,6 +503,8 @@ class ToolTabWidget(QtGui.QTabWidget): except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): return False -# def keyPressEvent(self, e): -# import ipdb -# ipdb.set_trace() + def keyPressEvent(self, e): + if e.key() == QtCore.Qt.Key_Return: + self.currentWidget().keyPressEvent(e) + else: + QtGui.QTabWidget.keyPressEvent(self, e) diff --git a/consolegui/application/ControlButton.py b/consolegui/application/ControlButton.py index 84806db..ad7a39a 100644 --- a/consolegui/application/ControlButton.py +++ b/consolegui/application/ControlButton.py @@ -267,4 +267,11 @@ class ControlButtonWgt(QtGui.QWidget): self.prev_button.setEnabled(True) if hasattr(self, 'clear_proc_cache_button'): self.clear_proc_cache_button.setEnabled(True) - self.ClientObj.app.processEvents() \ No newline at end of file + self.ClientObj.app.processEvents() + + def keyPressEvent(self, e): + if e.key() == QtCore.Qt.Key_Return: + if hasattr (self, 'next_button'): + self.next_button.click() + else: + QtGui.QTabWidget.keyPressEvent(self, e)