@@ -89,7 +89,7 @@ def __init__(self, parent=None):
89
89
#self.setTabWidth(4)
90
90
91
91
self .setAutoCompletionThreshold (1 )
92
- self .setAutoCompletionSource (self .AcsAPIs )
92
+ self .setAutoCompletionSource (self .AcsAPIs )
93
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
@@ -102,6 +102,22 @@ def __init__(self, parent=None):
102
102
self .SendScintilla (QsciScintilla .SCI_SETWRAPMODE , 1 )
103
103
self .SendScintilla (QsciScintilla .SCI_EMPTYUNDOBUFFER )
104
104
105
+ ## Disable command key
106
+ ctrl , shift = self .SCMOD_CTRL << 16 , self .SCMOD_SHIFT << 16
107
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('L' )+ ctrl )
108
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('T' )+ ctrl )
109
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('D' )+ ctrl )
110
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('Z' )+ ctrl )
111
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('Y' )+ ctrl )
112
+ self .SendScintilla (QsciScintilla .SCI_CLEARCMDKEY , ord ('L' )+ ctrl + shift )
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 )
117
+
118
+ def autoComplete (self ):
119
+ self .autoCompleteFromAll ()
120
+
105
121
def clearConsole (self ):
106
122
"""Clear the contents of the console."""
107
123
self .setText ('' )
0 commit comments