Not able to simulate key events in Message app using Tizen::Ui::SystemUtil::GenerateKeyEvent
Not able to simulate key events in Message app using Tizen::Ui::SystemUtil::GenerateKeyEvent
BY 27 Nov 2013Native Application Development
Hi,
I have created sample application that will launch Message app, which inturn generates and sends KEY_1 using Tizen::Ui::SystemUtil::GenerateKeyEvent().
Code Snippet of the code:
String strAppName = L"tizen.messages";
result r;
Tizen::App::AppControl* pAc = AppManager::FindAppControlN(strAppName, L"http://tizen.org/appcontrol/operation/compose");
if (pAc)
{
r = pAc->Start(null, null, null, null);
delete pAc;
}
AppLog("Application launch status : [%s]", GetErrorMessage(r));
sleep(2);
Tizen::Ui::KeyCode keyToSimulate = Tizen::Ui::KEY_1;
r = Tizen::Ui::SystemUtil::GenerateKeyEvent(Tizen::Ui::KEY_EVENT_TYPE_PRESSED, keyToSimulate);
AppLog("KEY_EVENT_TYPE_PRESSED [%d] and result :: %s", keyToSimulate, GetErrorMessage(r));
r = Tizen::Ui::SystemUtil::GenerateKeyEvent(Tizen::Ui::KEY_EVENT_TYPE_RELEASED, keyToSimulate);
AppLog("KEY_EVENT_TYPE_RELEASED [%d] and result :: %s", keyToSimulate, GetErrorMessage(r));
Application launched successfully and the result of the GenerateKeyEvent pressed and released is E_SUCCESS. The value ‘1’ is not getting printed on the Message app.
Not able to simulate key events in Message app using Tizen::Ui::SystemUtil::GenerateKeyEvent
Hi,
I have created sample application that will launch Message app, which inturn generates and sends KEY_1 using Tizen::Ui::SystemUtil::GenerateKeyEvent().
Code Snippet of the code:
Application launched successfully and the result of the GenerateKeyEvent pressed and released is E_SUCCESS. The value ‘1’ is not getting printed on the Message app.
Please help me to simulate the keys.
Thanks,
Anil.
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio