On Wed, 6 May 2009 12:38:38 -0500, David Hess <[email protected]>
wrote:
> On May 6, 2009, at 12:00 PM, Phil Thompson wrote:
>>
>> Exactly what problem are you having? Does Command-A select all the
>> text?
>>
>> The event handler effectively ignores events like the press of the
>> Command
>> key but passes on the subsequent press of the A key (with a flag set
>> saying
>> the Command modifier is in effect).
>>
>> Phil
>>
>
> Without my workaround, no Command keys work. Select All, Copy, Paste,
> Cut, etc. do nothing.
>
> The event with the A key and the Command modifier set is not being
> handled correctly in my environment. The code in
> QsciScintillaBase::keyPressEvent (line 394-396) expects
> QKeyEvent.text() to have an "A" in it and in my environment it is "".
> QKeyEvent.key() however is set properly and does indicate the A key.
>
> The result is the key stroke is completely ignored.
The attached patch should fix it - or tonight's snapshot.
Thanks,
Phil
Index: qt/qsciscintillabase.cpp
===================================================================
--- qt/qsciscintillabase.cpp (revision 2200)
+++ qt/qsciscintillabase.cpp (working copy)
@@ -554,7 +554,9 @@
utf8 = e->text().utf8();
#endif
- if (utf8.length() != 1)
+ if (utf8.length() == 0)
+ key = e->key();
+ else if (utf8.length() != 1)
key = 0;
else if ((key = utf8[0]) >= 0x80)
key = 0;
_______________________________________________
QScintilla mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/qscintilla