tags:

views:

124

answers:

1

Hi, how do I catch specific key events from the soft keyboard? specifically I'm interested in the "Done" key.

thanks, Ori

+4  A: 

You catch the KeyEvent and then check its keycode. FLAG_EDITOR_ACTION is used to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done"

if (event.getKeyCode() == KeyEvent.FLAG_EDITOR_ACTION)
    //your code here

Find the docs here.

Banang
Thanks! that solved my question!
oriharel
Good, glad I could help. :)
Banang