@Override public int translateKeyDown(int unicodeChar) { if (!Strings.isEmpty(typedText)) { char accent = typedText.charAt(typedText.length() - 1); int composed = KeyEvent.getDeadChar(accent, unicodeChar); if (composed != 0) { unicodeChar = composed; typedText.setLength(typedText.length() - 1); } } return unicodeChar; }