[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 847
Date       : Thu Apr 20 10:59:23 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/keypress.cpp

Ctrl+Char keys are now correctly handled as hot-keys in TextTool


Diff:
Index: Trunk/XaraLX/wxOil/keypress.cpp
===================================================================
--- Trunk/XaraLX/wxOil/keypress.cpp	(revision 846)
+++ Trunk/XaraLX/wxOil/keypress.cpp	(revision 847)
@@ -991,7 +991,7 @@
 		NumChars = 1;
 		pWideChar[0] = pKeySysMsg->m_Char;
 		
-		// We still have to try our custom translations (for VirtKey >= WXK_START
+		// We still have to try our custom translations (for VirtKey >= WXK_START)
 		if( pKeySysMsg->VirtKey >= WXK_START )
 		{
 			INT32 i;
@@ -1011,6 +1011,11 @@
 				NumChars = 0;
 		}
 		
+		// Windows translates Ctrl+char to control codes, I don't think we need too. Hopefully
+		// just using CR will be enought.
+		if( IsConstrainPressed() )
+			pWideChar[0] = _T('
');
+		
 #elif defined(__WXMSW__)
 		BYTE pKeyState[256];			// Array to hold the current state of the keyboard
 		if (GetKeyboardState(pKeyState))	// Scan the current keyboard state


Xara