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=112d07db4b6316469351b8ca5adf822d6ef78ef8;hp=ca201d3cdc4ce0ee9353270d9a8142533a4e11d1;hb=11ba5d111fecad79f948f180e7976a5a236a3da7;hpb=b4e175a80f1e50bbc97b67b03701ed2bdf7da4d8 diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index ca201d3..112d07d 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1707,8 +1707,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(); @@ -1778,6 +1785,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.