X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller.cpp;h=4eb5662ea8e8e802c7ac265c8103b98a33e6e80a;hp=047eb4b9dcbaff3e6109e56c78f89bab0afcdbe2;hb=660728e83fd72194f53642fd74c09db561f88496;hpb=b480cf8f1604782bc3104e1b170e73a27c9d351b diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index 047eb4b..4eb5662 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1719,8 +1719,15 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent ) int keyCode = keyEvent.keyCode; const std::string& keyString = keyEvent.keyPressed; + const bool isNullKey = ( 0 == keyCode ) && ( keyString.empty() ); + // Pre-process to separate modifying events from non-modifying input events. - if( Dali::DALI_KEY_ESCAPE == keyCode ) + if( isNullKey ) + { + // In some platforms arrive key events with no key code. + // Do nothing. + } + else if( Dali::DALI_KEY_ESCAPE == keyCode ) { // Escape key is a special case which causes focus loss KeyboardFocusLostEvent(); @@ -1790,6 +1797,7 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent ) if ( ( mImpl->mEventData->mState != EventData::INTERRUPTED ) && ( mImpl->mEventData->mState != EventData::INACTIVE ) && + ( !isNullKey ) && ( Dali::DALI_KEY_SHIFT_LEFT != keyCode ) ) { // Should not change the state if the key is the shift send by the imf manager.