// Generate a KeyPressEvent to send to Core
Dali::KeyEvent GenerateKeyPress( const std::string& keyName )
{
- Dali::KeyEvent keyPress = DevelKeyEvent::New(keyName, "", "", -1, 0, 0lu, Dali::KeyEvent::Down, "", "", Device::Class::NONE, Device::Subclass::NONE); // set name to test, key string to i and modifier to shift
+ Dali::KeyEvent keyPress = DevelKeyEvent::New(keyName, "", "", -1, 0, 0lu, Dali::KeyEvent::DOWN, "", "", Device::Class::NONE, Device::Subclass::NONE); // set name to test, key string to i and modifier to shift
return keyPress;
}
int32_t action = AKeyEvent_getAction( event );
int64_t timeStamp = AKeyEvent_getEventTime( event );
- Dali::KeyEvent::State state = Dali::KeyEvent::Down;
+ Dali::KeyEvent::State state = Dali::KeyEvent::DOWN;
switch ( action )
{
case AKEY_EVENT_ACTION_DOWN:
break;
case AKEY_EVENT_ACTION_UP:
- state = Dali::KeyEvent::Up;
+ state = Dali::KeyEvent::UP;
break;
}
if ( ! KeyLookup::IsDeviceButton( keyEvent.GetKeyName().c_str() ))
{
//check whether it's key down or key up event
- if ( keyEvent.GetState() == Dali::KeyEvent::Down )
+ if ( keyEvent.GetState() == Dali::KeyEvent::DOWN )
{
eventHandled = ProcessEventKeyDown( keyEvent );
}
- else if ( keyEvent.GetState() == Dali::KeyEvent::Up )
+ else if ( keyEvent.GetState() == Dali::KeyEvent::UP )
{
eventHandled = ProcessEventKeyUp( keyEvent );
}
if ( ! KeyLookup::IsDeviceButton( keyEvent.GetKeyName().c_str() ))
{
//check whether it's key down or key up event
- if ( keyEvent.GetState() == Dali::KeyEvent::Down )
+ if ( keyEvent.GetState() == Dali::KeyEvent::DOWN )
{
eventHandled = ProcessEventKeyDown( keyEvent );
}
- else if ( keyEvent.GetState() == Dali::KeyEvent::Up )
+ else if ( keyEvent.GetState() == Dali::KeyEvent::UP )
{
eventHandled = ProcessEventKeyUp( keyEvent );
}
if ( ! KeyLookup::IsDeviceButton( keyEvent.GetKeyName().c_str() ))\r
{\r
//check whether it's key down or key up event\r
- if ( keyEvent.GetState() == Dali::KeyEvent::Down )\r
+ if ( keyEvent.GetState() == Dali::KeyEvent::DOWN )\r
{\r
eventHandled = ProcessEventKeyDown( keyEvent );\r
}\r
- else if ( keyEvent.GetState() == Dali::KeyEvent::Up )\r
+ else if ( keyEvent.GetState() == Dali::KeyEvent::UP )\r
{\r
eventHandled = ProcessEventKeyUp( keyEvent );\r
}\r
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, deviceName, deviceClass, deviceSubclass );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass );
mKeyEventSignal.Emit( keyEvent );
}
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, deviceName, deviceClass, deviceSubclass );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass );
mKeyEventSignal.Emit( keyEvent );
}
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, deviceName, deviceClass, deviceSubclass );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, deviceName, deviceClass, deviceSubclass );
mKeyEventSignal.Emit( keyEvent );
}
GetDeviceClass( ecore_device_class_get( keyEvent->dev ), deviceClass );
GetDeviceSubclass( ecore_device_subclass_get( keyEvent->dev ), deviceSubclass );
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, deviceName, deviceClass, deviceSubclass );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, deviceName, deviceClass, deviceSubclass );
mKeyEventSignal.Emit( keyEvent );
}
keyString = keyEvent->string;
}
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
keyString = keyEvent->string;
}
- Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, logicalKey, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, compose, DEFAULT_DEVICE_NAME, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
// Ensure key event string is not NULL as keys like SHIFT have a null string.
keyString.push_back( event->wParam );
- Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Down, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::DOWN, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}
// Ensure key event string is not NULL as keys like SHIFT have a null string.
keyString.push_back( event->wParam );
- Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::Up, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
+ Integration::KeyEvent keyEvent( keyName, emptyString, keyString, keyCode, modifier, time, Integration::KeyEvent::UP, emptyString, emptyString, DEFAULT_DEVICE_CLASS, DEFAULT_DEVICE_SUBCLASS );
mKeyEventSignal.Emit( keyEvent );
}