mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
fix issue with home key
This commit is contained in:
parent
303f0a6e0a
commit
02b687321a
@ -111,9 +111,11 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
self.SendScintilla(QsciScintilla.SCI_CLEARCMDKEY, ord('Y')+ ctrl)
|
||||
self.SendScintilla(QsciScintilla.SCI_CLEARCMDKEY, ord('L')+ ctrl+shift)
|
||||
|
||||
## New QShortcut = ctrl+space for Autocomplete
|
||||
self.newShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_Space), self)
|
||||
self.newShortcut.activated.connect(self.autoComplete)
|
||||
## New QShortcut = ctrl+space/ctrl+alt+space for Autocomplete
|
||||
self.newShortcutCS = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_Space), self)
|
||||
self.newShortcutCAS = QShortcut(QKeySequence(Qt.CTRL + Qt.ALT + Qt.Key_Space), self)
|
||||
self.newShortcutCS.activated.connect(self.autoComplete)
|
||||
self.newShortcutCAS.activated.connect(self.autoComplete)
|
||||
|
||||
def autoComplete(self):
|
||||
self.autoCompleteFromAll()
|
||||
@ -360,6 +362,9 @@ class PythonEdit(QsciScintilla, code.InteractiveInterpreter):
|
||||
elif self.is_cursor_on_last_line():
|
||||
self.SendScintilla(QsciScintilla.SCI_CLEAR)
|
||||
e.accept()
|
||||
elif e.key() == Qt.Key_Home:
|
||||
self.setCursorPosition(linenr,4)
|
||||
self.ensureCursorVisible()
|
||||
elif e.key() == Qt.Key_Down and not self.isListActive():
|
||||
self.showPrevious()
|
||||
elif e.key() == Qt.Key_Up and not self.isListActive():
|
||||
|
Loading…
x
Reference in New Issue
Block a user