Integration::KeyEvent keyEvent;
DALI_TEST_EQUALS( keyEvent.type, Integration::Event::Key, TEST_LOCATION );
DALI_TEST_CHECK( keyEvent.keyName == std::string() );
+ DALI_TEST_CHECK( keyEvent.logicalKey == std::string() );
DALI_TEST_CHECK( keyEvent.keyString == std::string() );
DALI_TEST_EQUALS( keyEvent.keyCode, -1, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.keyModifier, 0, TEST_LOCATION );
{
const std::string keyName("keyName");
+ const std::string logicalKey("logicalKey");
const std::string keyString("keyString");
const int keyCode(333);
const int keyModifier(312);
const Device::Class::Type deviceClass = Device::Class::KEYBOARD;
const Device::Subclass::Type deviceSubclass = Device::Subclass::NONE;
- Integration::KeyEvent keyEvent(keyName, keyString, keyCode, keyModifier, timeStamp, keyState, compose, deviceName, deviceClass, deviceSubclass );
+ Integration::KeyEvent keyEvent(keyName, logicalKey, keyString, keyCode, keyModifier, timeStamp, keyState, compose, deviceName, deviceClass, deviceSubclass );
DALI_TEST_EQUALS( keyEvent.type, Integration::Event::Key, TEST_LOCATION );
DALI_TEST_CHECK( keyEvent.keyName == keyName );
+ DALI_TEST_CHECK( keyEvent.logicalKey == logicalKey );
DALI_TEST_CHECK( keyEvent.keyString == keyString );
DALI_TEST_EQUALS( keyEvent.keyCode, keyCode, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.keyModifier, keyModifier, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.type, Integration::Event::Key, TEST_LOCATION );
DALI_TEST_CHECK( keyEvent.keyName == TEST_STRING_1 );
+ DALI_TEST_CHECK( keyEvent.logicalKey == "" );
DALI_TEST_CHECK( keyEvent.keyString == "i" );
DALI_TEST_EQUALS( keyEvent.keyCode, 99, TEST_LOCATION );
DALI_TEST_EQUALS( keyEvent.keyModifier, SHIFT_MODIFIER, TEST_LOCATION );
KeyEventGeneratedReceivedFunctor functor2( data2 );
GetImplementation( stage ).ConnectSignal( &application, "keyEventGenerated", functor2 );
- Integration::KeyEvent event( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event2 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event3 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event4 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
KeyEventReceivedFunctor functor( data );
stage.KeyEventSignal().Connect( &application, functor );
- Integration::KeyEvent event( "i", "i", 0, 0, 0, Integration::KeyEvent::Down, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Down, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event2( "i", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event2( "i", "", "i", 0, 0, 0, Integration::KeyEvent::Up, "i", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event2 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event3( "a", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event3( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Down, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event3 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
data.Reset();
- Integration::KeyEvent event4( "a", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
+ Integration::KeyEvent event4( "a", "", "a", 0, 0, 0, Integration::KeyEvent::Up, "a", DEFAULT_DEVICE_NAME, Device::Class::NONE, Device::Subclass::NONE );
application.ProcessEvent( event4 );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
// CLASS HEADER
#include <dali/integration-api/events/key-event-integ.h>
+// INTERNAL INCLUDES
+#include <dali/internal/event/events/key-event-impl.h>
+
namespace Dali
{
KeyEvent::KeyEvent()
: Event( Key ),
keyName(),
+ logicalKey(),
keyString(),
keyCode( -1 ),
keyModifier( 0 ),
{
}
-KeyEvent::KeyEvent( const std::string& keyName, const std::string& keyString, int keyCode, int keyModifier,
+KeyEvent::KeyEvent( const std::string& keyName, const std::string& logicalKey, const std::string& keyString, int keyCode, int keyModifier,
unsigned long timeStamp, const State& keyState, const std::string& compose, const std::string& deviceName,
const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass )
: Event( Key ),
keyName( keyName ),
+ logicalKey( logicalKey ),
keyString( keyString ),
keyCode( keyCode ),
keyModifier( keyModifier ),
KeyEvent::KeyEvent( const Dali::KeyEvent& event )
: Event( Key ),
keyName( event.keyPressedName ),
+ logicalKey( "" ),
keyString( event.keyPressed ),
keyCode( event.keyCode ),
keyModifier( event.keyModifier ),
deviceClass( Device::Class::NONE ),
deviceSubclass( Device::Subclass::NONE )
{
+ const Internal::KeyEventImpl* keyEventImpl = GetImplementation( &event );
+ logicalKey = keyEventImpl->GetLogicalKey();
+ compose = keyEventImpl->GetCompose();
+ deviceName = keyEventImpl->GetDeviceName();
+ deviceClass = keyEventImpl->GetDeviceClass();
+ deviceSubclass = keyEventImpl->GetDeviceSubclass();
}
KeyEvent::~KeyEvent()