title: Space Key Click Event in android
body: <p>I want to get the space key event in an android keyboard.
  I tried some codes from google searches. but nothing is working.</p>
  
  <pre><code> public boolean onKey(View v, int keyCode, KeyEvent event) {
  
          if (event.getAction() == KeyEvent.KEYCODE_SPACE){
              Toast.makeText(PrabheshActivity.this, "ssss", Toast.LENGTH_SHORT).show();
          }
          return true;
      }
  </code></pre>
  
  <p>why is this not working? please help</p>