r14135 by cbradney - Add X11 hack for control shifted keystrokes

scribus-commit scribus-commit at lists.scribus.net
Sun Oct 11 00:38:17 CEST 2009


Revision: 14135
Author: cbradney
Date: 2009-10-10T21:29:19.716319Z
Commit message: Add X11 hack for control shifted keystrokes

Changeset: 
M  /trunk/Scribus/scribus/pageitem_textframe.cpp

Diffs:
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(revision 14134)
+++ scribus/pageitem_textframe.cpp	(revision 14135)
@@ -3157,13 +3157,20 @@
 		bool doUpdate = false;
 		if (itemText.lengthOfSelection() > 0) //(kk < 0x1000)
 		{
-			if (!k->text().isEmpty())
+			bool x11Hack=false;
+#if defined (Q_WS_X11)
+			if ((k->text().size()==1) && (k->modifiers() & Qt::ShiftModifier) && (k->modifiers() & Qt::ControlModifier) && (k->nativeVirtualKey() < 1000))
+				x11Hack=true;
+#endif
+			if (!x11Hack && !k->text().isEmpty())
 			{
 				deleteSelectedTextFromFrame();
 				doUpdate = true;
 			}
 			/*
+			qDebug()<<"Key:"<<k->key();
 			qDebug()<<"Text:"<<k->text();
+			qDebug()<<"Size:"<<k->text().size();
 			qDebug()<<"Modifiers:"<<k->modifiers();
 			qDebug()<<"Native Modifiers:"<<k->nativeModifiers();
 			qDebug()<<"Native Scan Code:"<<k->nativeScanCode();




More information about the scribus-commit mailing list