summaryrefslogtreecommitdiff
path: root/packages/qte/qte-2.3.10/key.patch
blob: 9092accd2ce7151a46c8e70b03b0ac3a70387472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#

Index: qt-2.3.10/src/kernel/qkeyboard_qws.cpp
===================================================================
--- qt-2.3.10.orig/src/kernel/qkeyboard_qws.cpp	2005-03-31 17:51:14.978609000 -0500
+++ qt-2.3.10/src/kernel/qkeyboard_qws.cpp	2005-03-31 17:54:28.140243968 -0500
@@ -848,6 +848,9 @@
     bool release = false;
     int keypad = 0;
 
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // need autorepeat implemented here?
+        bool repeatable = TRUE;
+
 #ifndef QT_QWS_USE_KEYCODES
 #if defined(QT_QWS_IPAQ)
     // map ipaq 'action' key (0x60, 0xe0)
@@ -984,9 +987,6 @@
 	if ( currentKey )
 	    keyCode = currentKey->key_code;
 
-#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // need autorepeat implemented here?
-	bool repeatable = TRUE;
-
 #if defined(QT_QWS_IPAQ)
 	switch (code) {
 #if defined(QT_QWS_SL5XXX)
@@ -1061,25 +1061,23 @@
 	    repeatable = FALSE;
 #endif
 
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
 	if ( qt_screen->isTransformed()
 	     && keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down )
 	    {
 		keyCode = xform_dirkey(keyCode);
 	    }
-
-#ifdef QT_QWS_AUTOREPEAT_MANUALLY
-	if ( repeatable && !release )
-	    rep->start(prevuni,prevkey,modifiers);
-	else
-	    rep->stop();
 #endif
+	
 #endif
 	/*
 	  Translate shift+Key_Tab to Key_Backtab
 	*/
 	if (( keyCode == Key_Tab ) && shift )
 	    keyCode = Key_Backtab;
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
     }
+#endif
 
 #ifndef QT_QWS_USE_KEYCODES
     /*
@@ -1234,6 +1232,14 @@
 	} else {
 	    prevkey = prevuni = 0;
 	}
+
+#ifdef QT_QWS_AUTOREPEAT_MANUALLY
+        if ( repeatable && !release )
+            rep->start(prevuni,prevkey,modifiers);
+        else
+            rep->stop();
+#endif
+
     }
 #ifndef QT_QWS_USE_KEYCODES
     extended = 0;
@@ -2056,6 +2062,7 @@
             press ? "press" : "release",
             repeatable ? "true":"false" );
 
+#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX)
     if ( qt_screen->isTransformed() && k >= Qt::Key_Left && k <= Qt::Key_Down )
     {
         qDebug( "SimpadButtonsHandler() - We are transformed! Correcting..." );
@@ -2063,6 +2070,7 @@
         k = xform_dirkey( k );
         qDebug( "SimpadButtonsHandler() - Old Key: %d - New Key %d", oldK, k );
     }
+#endif
 
     if ( repeatable && press )
         repeater->start( repeatdelay, true );