diff -r 00f9ee97d895 -r f05641c183ff bluetoothengine/bthid/keyboard/src/keyboard.cpp --- a/bluetoothengine/bthid/keyboard/src/keyboard.cpp Fri Apr 16 15:08:36 2010 +0300 +++ b/bluetoothengine/bthid/keyboard/src/keyboard.cpp Mon May 03 12:40:50 2010 +0300 @@ -140,7 +140,7 @@ if (iComboDevice) { - RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorHide ); + RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorNotInitialized ); } if (iSettings) @@ -288,7 +288,7 @@ CancelAllKeys(); if (iComboDevice) { - RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorHide ); + RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorNotInitialized ); } } @@ -343,10 +343,16 @@ { TInt mouseStatus; TInt err = RProperty::Get( KPSUidBthidSrv, KBTMouseCursorState, mouseStatus ); - if ( !err && (static_cast(mouseStatus) == ECursorHide) ) + if ( !err && + ((static_cast(mouseStatus) == ECursorRedraw)|| + (static_cast(mouseStatus) == ECursorReset)) ) { err = RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorShow ); + DBG(RDebug::Print( + _L("[BTHID]\tCHidKeyboardDriver::DataIn() ECursorRedraw ||ECursorReset ")) ); } + + CursorRedraw(); } InterruptData(aPayload); } @@ -462,6 +468,7 @@ iButton2Down = ETrue; TRawEvent rawEvent; rawEvent.Set(TRawEvent::EKeyDown, EStdKeyApplication0); + CursorRedraw(); UserSvr::AddEvent(rawEvent); } } @@ -472,6 +479,7 @@ iButton2Down = EFalse; TRawEvent rawEvent; rawEvent.Set(TRawEvent::EKeyUp, EStdKeyApplication0); + CursorRedraw(); UserSvr::AddEvent(rawEvent); } } @@ -1157,7 +1165,7 @@ #endif //Number entry to Telephone app is handled differently. - if ((IsDigitKey(aScanCode) || IsSpecialHandleKey(aUnicodeKey)) + if ((IsDigitKey(aScanCode) || IsSpecialHandleKey(aUnicodeKey) || aScanCode == EStdKeyBackspace ) && IsPhoneAppTopMost()) return; @@ -1929,4 +1937,18 @@ CancelAllKeys(); } +void CHidKeyboardDriver::CursorRedraw() + { + TInt mouseStatus; + + TInt err = RProperty::Get( KPSUidBthidSrv, KBTMouseCursorState, mouseStatus ); + if ( !err ) + { + err = RProperty::Set( KPSUidBthidSrv, KBTMouseCursorState, ECursorRedraw ); + DBG(RDebug::Print( + _L("[BTHID]\tCHidKeyboardDriver::CursorRedraw() X->ECursorRedraw") ) ); + } + } + +// ---------------------------------------------------------------------- // End of file