I'm trying to detect a Space click on the Keyboard using KEYBOARD_SPACE
and it doesn't seem to detect anything. My code is:
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.KEYCODE_SPACE:
return true;
case KeyEvent.KEYCODE_DEL:
return true;
default:
return super.onKeyUp(keyCode, event);
}
}
The second case KeyEvent.KEYCODE_DEL
works perfectly, so I'm a little unsure what the problem is. Is there a better way of doing this?
Thanks for any help in advance!