author | aquadran <aquadran> | 2006-12-13 20:36:14 (UTC) |
---|---|---|
committer | aquadran <aquadran> | 2006-12-13 20:36:14 (UTC) |
commit | bb6f32ae999168fc44d50d3523c3ef232824185a (patch) (unidiff) | |
tree | 1d89bf239f98c4e3ce6fc83131b6b2c4ec5aac2c /libopie2 | |
parent | 5a0012fb3b75ff41437b0685386731d1367e4e7b (diff) | |
download | opie-bb6f32ae999168fc44d50d3523c3ef232824185a.zip opie-bb6f32ae999168fc44d50d3523c3ef232824185a.tar.gz opie-bb6f32ae999168fc44d50d3523c3ef232824185a.tar.bz2 |
changed suspend button mapping for mypal too same as for ipaqs
-rw-r--r-- | libopie2/opiecore/device/odevice_mypal.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_mypal.cpp b/libopie2/opiecore/device/odevice_mypal.cpp index 208be46..73b31cb 100644 --- a/libopie2/opiecore/device/odevice_mypal.cpp +++ b/libopie2/opiecore/device/odevice_mypal.cpp | |||
@@ -144,27 +144,27 @@ bool MyPal::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, | |||
144 | case Key_Right: | 144 | case Key_Right: |
145 | case Key_Up : | 145 | case Key_Up : |
146 | case Key_Down : { | 146 | case Key_Down : { |
147 | // Rotate the cursor keys by 270 | 147 | // Rotate the cursor keys by 270 |
148 | // keycode - Key_Left = position of the button starting from left clockwise | 148 | // keycode - Key_Left = position of the button starting from left clockwise |
149 | // add the rotation to it and modolo. No we've the original offset | 149 | // add the rotation to it and modolo. No we've the original offset |
150 | // add the offset to the Key_Left key | 150 | // add the offset to the Key_Left key |
151 | if ( d->m_model == Model_MyPal_716 ) | 151 | if ( d->m_model == Model_MyPal_716 ) |
152 | newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; | 152 | newkeycode = Key_Left + ( keycode - Key_Left + 3 ) % 4; |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | 155 | ||
156 | // map Power Button short/long press to F6 | 156 | // map Power Button short/long press |
157 | case Key_F6: { | 157 | case HardKey_Suspend: { // Hope we don't have infinite recursion here: |
158 | if ( isPress ) { | 158 | if ( isPress ) { |
159 | if ( m_power_timer ) | 159 | if ( m_power_timer ) |
160 | killTimer ( m_power_timer ); | 160 | killTimer ( m_power_timer ); |
161 | m_power_timer = startTimer ( 500 ); | 161 | m_power_timer = startTimer ( 500 ); |
162 | } | 162 | } |
163 | else if ( m_power_timer ) { | 163 | else if ( m_power_timer ) { |
164 | killTimer ( m_power_timer ); | 164 | killTimer ( m_power_timer ); |
165 | m_power_timer = 0; | 165 | m_power_timer = 0; |
166 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); | 166 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); |
167 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); | 167 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); |
168 | } | 168 | } |
169 | newkeycode = Key_unknown; | 169 | newkeycode = Key_unknown; |
170 | break; | 170 | break; |