Hi, I did some more tests and could reproduce your problem by clearing the keyboard binding for the Return and/or Enter key in the keyboard configuration dialog. Therefore, I kindly ask you to check your setup.
Regards, Detlev On Sunday 09 July 2006 01:50, Laurent Dufréchou wrote: > Finally I've found why my enter key don't work... > > In Shell.py: > > self.supportedEditorCommands = { > QextScintilla.SCI_LINEDELETE : self.clearCurrentLine, > QextScintilla.SCI_TAB : self.handleQScintillaTab, > QextScintilla.SCI_NEWLINE : self.handleQScintillaNewline, > > I've modified keyPresEvent to printout ev.key() > and it seems that my 'enter' key generate 4100 instead of SCI_NEWLINE(2329) > I've tried to add this :) > 4100 : self.handleQScintillaNewline, > but it doesn't work... > In fact 4100 is not recognised in the ENUM of Qscintilla. > > So I've modified: > > def keyPressEvent(self, ev): > """ > Re-implemented to handle the user input a key at a time. > > @param ev key event (QKeyPressEvent) > """ > txt = ev.text() > key = ev.key() > asc = ev.ascii() > buf = unicode('') > #self.insert(str(key)) > # See it is text to insert. > if txt.length(): > if key == 4100: <-- > self.handleQScintillaNewline(cmd) <-- > return > if self.echoInput: > ac = self.isAutoCompletionActive() > QextScintillaCompat.keyPressEvent(self, ev, cmd) > self.incrementalSearchActive = True > if ac and \ > self.racEnabled: > > self.dbs.remoteCompletion(self.completionText+unicode(txt)) > else: > self.insertTextNoEcho(txt) > return > else: > ev.ignore() > > > The fact is that self.handleQScintillaNewline needs 'cmd' that is not in > keyPressEvent scope... > Can you help me to corresct this? > Or perhaps this is not the right way to handle my bug? > > (What ? Just update PyQt ? well that a possibility ^_^ ) > > Laurent -- Detlev Offenbach [EMAIL PROTECTED] _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde