[PyKDE] Does anybody got the same issue?
Laurent Dufréchou
laurent.dufrechou at free.fr
Sun Jul 9 00:01:19 BST 2006
Good I've got an updated status!
I've done some experimentation :)
An now I've got a much clearer view from where comes the problem!
If looked @ Shell.py code in Qscintilla directory of eric3
There is these two functions:
def handleQScintillaNewline(self, cmd):
"""
Private method to handle the Return key.
@param cmd QScintilla command
"""
if self.isAutoCompletionActive():
self.SendScintilla(cmd)
else:
self.incrementalSearchString = ""
self.incrementalSearchActive = False
line, col = self.getEndPos()
self.setCursorPosition(line,col)
buf = unicode(self.text(line)).replace(sys.ps1,
"").replace(sys.ps2, "")
self.insert('\n>>>')
self.executeCommand(buf)
def handleQScintillaLeftCommand(self, method):
"""
Private method to handle a QScintilla command working to the left.
@param method shell method to execute
"""
line, col = self.getCursorPosition()
if self.text(line).startsWith(sys.ps1):
if col > len(sys.ps1):
method()
elif self.text(line).startsWith(sys.ps2):
if col > len(sys.ps2):
method()
elif col > 0:
method()
As you can see I've done a little modifcation in handleQScintillaNewline:
I've replaced self.insert('\n') by self.insert('\n>>>')
The fact is that when I push enter nothing happen . I mean no '>>>' as I
expected.
Left key seemed to work so I've done this experiment:
I've copied the code from handleQScintillaNewline into
handleQScintillaLeftCommand....
And now if i press left, all is working!
The code is now interpreted on left key event.
SO, it seems that the 'enter' key is not detected, do you have any idea
of where I could continue my test?
I mean do you know where keys are managed in Shell.py?
Laurent
More information about the PyQt
mailing list