how I can to handle key event in softkeyboard with edittext in androed
<p>I am try to handle event softkeyboar in android 
but when I press on enter key never generate any thing
what I do ??
please any one edit on my code</p>

<pre><code>public class MainActivity extends Activity implements OnKeyListener  {
EditText editText1;
 EditText editText2;
      public void 
onCreate(Bundle savedInstanceState) {
      super.onCreate
(savedInstanceState);
      setContentView
(R.layout.activity_main);
      editText1 = (EditText) 
findViewById(R.id.editText1);
editText1.setOnKeyListener(this);
      editText2 = (EditText) findViewById(R.id.editText2);
      editText2.setOnKeyListener(this);
      InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
      imm.showSoftInput(editText1, InputMethodManager.SHOW_IMPLICIT);
       }
     public boolean onKey(View view, int keyCode, KeyEvent event) {
      if (event.getAction() == KeyEvent.KEYCODE_ENTER) 
      {
     editText2.setText("hello");      
      }
      return false; // pass on to other listeners.
     }
    }
</code></pre>
