Soft keyboard enter key event handle
<p>i want to do some stuff on soft keyboard enter key press. so i do code like below but it execute twice  but i want that only once, so anyone know about this, if know than please give me reply for this. my code and output is like below...</p>

<pre><code>Code here

  public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        txt = (EditText)findViewById(R.id.txt);

        txt.setOnKeyListener(new OnKeyListener() {


            @Override
            public boolean onKey(View v, int keyCode, KeyEvent event) {
                // TODO Auto-generated method stub

                {
                    if(keyCode == KeyEvent.KEYCODE_ENTER)
                    {
                        Log.e("test","--------- on enter");
                        return false;
                    }
                }
                return false;
            }
        });

    }`
</code></pre>

<p><img src="http://i.stack.imgur.com/py2Lo.png" alt="This is my out put for this"></p>
