@Override public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) { if (keyCode != KeyEvent.KEYCODE_UNKNOWN || event.getAction() != KeyEvent.ACTION_MULTIPLE) return super.onKeyMultiple(keyCode, count, event); if (event.getCharacters() != null) { int utf8Char = event.getCharacters().codePointAt(0); handleKeyDown(host, utf8Char, utf8Char); return true; } return false; }
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_VOLUME_UP: case KeyEvent.KEYCODE_VOLUME_DOWN: return super.onKeyDown(keyCode, event); default: break; } handleKeyDown(host, keyCode, event.getUnicodeChar()); return true; }
@Override public boolean onKeyUp(int keyCode, KeyEvent event) { handleKeyUp(host, keyCode, event.getUnicodeChar()); return true; }