Send text message when pressing enter on android keyboard

This commit is contained in:
Deve 2018-03-15 21:35:12 +01:00
parent 38a4e06a6c
commit 98a7b5a03e

View File

@ -233,6 +233,7 @@ EventPropagation ScreenKeyboard::processEvent(const std::string& eventSource)
SEvent event;
bool send_event = false;
bool close_keyboard = false;
if (eventSource == "Shift")
{
@ -264,8 +265,10 @@ EventPropagation ScreenKeyboard::processEvent(const std::string& eventSource)
}
else if (eventSource == "Enter")
{
dismiss();
return EVENT_BLOCK;
event.KeyInput.Key = IRR_KEY_RETURN;
event.KeyInput.Char = 0;
send_event = true;
close_keyboard = true;
}
else if (eventSource == "Back")
{
@ -295,6 +298,11 @@ EventPropagation ScreenKeyboard::processEvent(const std::string& eventSource)
m_edit_box->OnEvent(event);
}
if (close_keyboard)
{
dismiss();
}
return EVENT_BLOCK;
} // processEvent