title: How to get message (Toast) ,if any key pressed in keyboard
body: <p>my application needs a edit text ,when i enter anything in that edit text .it should show a message that for example (Enter pressed ,tab pressed, space pressed )etc.
  is there any way to do that. i am doing this</p>
  
  <pre><code> public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
   etext =(EditText)findViewById(R.id.editText1);
   etext.setOnKeyListener(this);
   }
  @Override
  public boolean onKey(View v, int keyCode, KeyEvent event) {
       if ((event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp; (keyCode == KeyEvent.KEYCODE_ENTER)) {
            Toast.makeText(this, etext.getText(), Toast.LENGTH_SHORT).show(); //show tost here
            return true;
       }
      return false;
  }*
  </code></pre>