radio_or_checkbox_focused_ = is_radio_or_checkbox;
password_input_minlength_ = password_input_minlength;
input_maxlength_ = input_maxlength;
+ SetRadioOrCheckBoxFocused(radio_or_checkbox_focused_);
#endif
auto im_context = GetIMContextEfl();
on_mouse_move_callback_.Run();
}
+void RWHVAuraCommonHelperEfl::SetRadioOrCheckBoxFocused(
+ bool radio_or_checkbox_focused) {
+ if (auto* event_handler = GetEventHandler())
+ event_handler->SetRadioOrCheckBoxFocused(radio_or_checkbox_focused);
+}
+
void RWHVAuraCommonHelperEfl::UpdateCustomCursor(const ui::Cursor& cursor) {
// get custom image
SkBitmap bitmap = cursor.custom_bitmap();
#if BUILDFLAG(IS_TIZEN_TV)
if (IsTvProfile()) {
thiz->ConvertUpToReturnBackIfNeeded(key_down, true);
+ thiz->ConvertEnterToSpaceIfNeeded(key_down);
// In Webbrowser scene,"Cancel" key haven't added on the map,the keycode is
// 0. "Cancel" key is delivered by IME, for hiding IME panel,no need deliver
if (IsTvProfile()) {
#if BUILDFLAG(IS_TIZEN_TV)
thiz->ConvertUpToReturnBackIfNeeded(key_up, false);
+ thiz->ConvertEnterToSpaceIfNeeded(key_up);
#endif
// For TV IME "Select" and "Cancel" key
"same as Return Back key!";
}
+template <typename EVT>
+void EflEventHandler::ConvertEnterToSpaceIfNeeded(EVT* evt) {
+ if (evas_device_name_get(evt->dev) && !strcmp(evt->key, "Return") &&
+ radio_or_checkbox_focused_) {
+ const char* input_device_name = evas_device_name_get(evt->dev);
+ if (!strstr(input_device_name, "keyboard") &&
+ !strstr(input_device_name, "Keyboard") &&
+ !strstr(input_device_name, "key board")) {
+ evt->key = "space";
+ evt->keycode = 65; /*space keycode*/
+ evt->string = " ";
+ LOG(INFO) << "Enter key is converted to space key for radio button"
+ " or checkbox input!";
+ }
+ }
+}
+
void EflEventHandler::SetKeyEventChecker(
const base::RepeatingCallback<bool(void*, bool)>& checker) {
key_event_checker_ = checker;
void SetPopupMenuVisible(const bool visible);
void SetPopupMenuBounds(const gfx::Rect& popup_bounds);
+ void SetRadioOrCheckBoxFocused(bool radio_or_checkbox_focused) {
+ radio_or_checkbox_focused_ = radio_or_checkbox_focused;
+ }
#endif
void SetMouseEventsEnabled(bool enabled);
bool GetTouchEventsEnabled(const EVT* evas_evt);
#if BUILDFLAG(IS_TIZEN_TV)
+ template <typename EVT>
+ void ConvertEnterToSpaceIfNeeded(EVT* evt);
+
template <typename EVT>
void ConvertUpToReturnBackIfNeeded(EVT* evt, bool is_press);
+
+ bool radio_or_checkbox_focused_ = false;
#endif
bool FilterIMEKeyDownEvent(Evas_Event_Key_Down* key_down);