Exit keyboard (entry) when done clicked

I have configured an entry (keyboard) to replace the return key with 'DONE'.  This is a single line entry.

Now I would like clicking the done key to trigger closing the keyboard.  How should I do this?

1. Do I have to listen for every change to the text awaiting a '\n' ?  If so how.

2. Do I have to manually remove the '\n' from the text after I get it from the entry component?  Or can I prevent the '\n' from being inserted/appended to the entry text?


I could not find a signal from the Entry that would indicate done was clicked.  I seem to recall that I read that somewhere, but can't find where that signal would be.


Edited by: Michelle Dupuis on 19 Aug, 2019


4 Replies

I solved it like this:

To the entry object, I added: evas_object_smart_callback_add(ad->entry, "activated", on_entry_activated, ad). This triggers when Done is pressed.

In on_entry_activated, after processing the input (using elm_entry_entry_get(ad->entry)), I hid the keyboard with elm_entry_input_panel_hide(ad->entry).

Hazael Mendez


I have the same issue, I wanna click the Done button, and close the keyboard,  

I tried with three differents types of callbacks, and it does not work

    Evas_Object *entry;
    entry = elm_entry_add(ad->win);
    elm_entry_single_line_set(entry, EINA_TRUE);
    elm_entry_scrollable_set(entry, EINA_TRUE);
    evas_object_resize(entry, 101070);
    evas_object_move(entry,20 , 250);
    evas_object_smart_callback_add(entry, "text,set,done", _search_entry_activate_cb,entry);
    evas_object_smart_callback_add(entry, "redo,request", _search_entry_activate_cb,entry);
    evas_object_smart_callback_add(entry, "activated", _search_entry_activate_cb,entry);


static void
_search_entry_activate_cb(void *data, Evas_Object *obj, void *event_info)
    Evas_Object *entry =static_cast<Evas_Object *>(data);


could you help me please


Paul L

Hi, do  you test this on emulator or real device? What os version?

Hazael Mendez

Hi, do  you test this on emulator or real device? 

        Real device;

What os version?

        is a TV, model 2020