projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Implement scroll bar in the TextEditor" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
text-controller.cpp
diff --git
a/dali-toolkit/internal/text/text-controller.cpp
b/dali-toolkit/internal/text/text-controller.cpp
index
047eb4b
..
4eb5662
100644
(file)
--- 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;
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.
// 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();
{
// 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 ) &&
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.
( Dali::DALI_KEY_SHIFT_LEFT != keyCode ) )
{
// Should not change the state if the key is the shift send by the imf manager.