@@ -89,8 +89,8 @@ def __init__(self, parent=None):
89
89
#self.setTabWidth(4)
90
90
91
91
self .setAutoCompletionThreshold (1 )
92
- self .setAutoCompletionSource (self .AcsAPIs )
93
-
92
+ self .setAutoCompletionSource (self .AcsAPIs )
93
+
94
94
# Don't want to see the horizontal scrollbar at all
95
95
# Use raw message to Scintilla here (all messages are documented
96
96
# here: http://www.scintilla.org/ScintillaDoc.html)
@@ -111,9 +111,11 @@ def __init__(self, parent=None):
111
111
self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('Y' )+ ctrl )
112
112
self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('L' )+ ctrl + shift )
113
113
114
- ## New QShortcut = ctrl+space for Autocomplete
115
- self .newShortcut = QShortcut (QKeySequence (Qt .CTRL + Qt .Key_Space ), self )
116
- self .newShortcut .activated .connect (self .autoComplete )
114
+ ## New QShortcut = ctrl+space/ctrl+alt+space for Autocomplete
115
+ self .newShortcutCS = QShortcut (QKeySequence (Qt .CTRL + Qt .Key_Space ), self )
116
+ self .newShortcutCAS = QShortcut (QKeySequence (Qt .CTRL + Qt .ALT + Qt .Key_Space ), self )
117
+ self .newShortcutCS .activated .connect (self .autoComplete )
118
+ self .newShortcutCAS .activated .connect (self .autoComplete )
117
119
118
120
def autoComplete (self ):
119
121
self .autoCompleteFromAll ()
@@ -360,6 +362,9 @@ def keyPressEvent(self, e):
360
362
elif self .is_cursor_on_last_line ():
361
363
self .SendScintilla (QsciScintilla .SCI_CLEAR )
362
364
e .accept ()
365
+ elif e .key () == Qt .Key_Home :
366
+ self .setCursorPosition (linenr ,4 )
367
+ self .ensureCursorVisible ()
363
368
elif e .key () == Qt .Key_Down and not self .isListActive ():
364
369
self .showPrevious ()
365
370
elif e .key () == Qt .Key_Up and not self .isListActive ():
0 commit comments