Show More
@@ -91,14 +91,20 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
91 | 91 | |
|
92 | 92 | #------ Protected class variables ------------------------------------------ |
|
93 | 93 | |
|
94 | # When the control key is down, these keys are mapped. | |
|
94 | 95 | _ctrl_down_remap = { QtCore.Qt.Key_B : QtCore.Qt.Key_Left, |
|
95 | 96 | QtCore.Qt.Key_F : QtCore.Qt.Key_Right, |
|
96 | 97 | QtCore.Qt.Key_A : QtCore.Qt.Key_Home, |
|
97 | QtCore.Qt.Key_E : QtCore.Qt.Key_End, | |
|
98 | 98 | QtCore.Qt.Key_P : QtCore.Qt.Key_Up, |
|
99 | 99 | QtCore.Qt.Key_N : QtCore.Qt.Key_Down, |
|
100 | 100 | QtCore.Qt.Key_D : QtCore.Qt.Key_Delete, } |
|
101 | if not sys.platform == 'darwin': | |
|
102 | # On OS X, Ctrl-E already does the right thing, whereas End moves the | |
|
103 | # cursor to the bottom of the buffer. | |
|
104 | _ctrl_down_remap[QtCore.Qt.Key_E] = QtCore.Qt.Key_End | |
|
101 | 105 | |
|
106 | # The shortcuts defined by this widget. We need to keep track of these to | |
|
107 | # support 'override_shortcuts' above. | |
|
102 | 108 | _shortcuts = set(_ctrl_down_remap.keys() + |
|
103 | 109 | [ QtCore.Qt.Key_C, QtCore.Qt.Key_G, QtCore.Qt.Key_O, |
|
104 | 110 | QtCore.Qt.Key_V ]) |
@@ -172,8 +178,8 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
172 | 178 | action.setEnabled(True) |
|
173 | 179 | printkey = QtGui.QKeySequence(QtGui.QKeySequence.Print) |
|
174 | 180 | if printkey.matches("Ctrl+P") and sys.platform != 'darwin': |
|
175 |
# |
|
|
176 | # Qt ctrl = cmd on OSX, so the match gets a false positive on darwin | |
|
181 | # Only override the default if there is a collision. | |
|
182 | # Qt ctrl = cmd on OSX, so the match gets a false positive on darwin. | |
|
177 | 183 | printkey = "Ctrl+Shift+P" |
|
178 | 184 | action.setShortcut(printkey) |
|
179 | 185 | action.triggered.connect(self.print_) |
General Comments 0
You need to be logged in to leave comments.
Login now