@Override
  public boolean onTouchEvent(@NonNull MotionEvent me) {
    if (getMiniKeyboard() != null && mMiniKeyboardPopup.isShowing()) {
      final int miniKeyboardX = (int) me.getX();
      final int miniKeyboardY = (int) me.getY();
      final int action = MotionEventCompat.getActionMasked(me);

      MotionEvent translated =
          generateMiniKeyboardMotionEvent(action, miniKeyboardX, miniKeyboardY, me.getEventTime());
      getMiniKeyboard().onTouchEvent(translated);
      translated.recycle();
      return true;
    }

    return super.onTouchEvent(me);
  }
@Test
  public void testLongPressKeyPressStateWithPopupCharacters() {
    final AnyKeyboard.AnyKey key = findKey('w');
    Assert.assertTrue(key.popupCharacters.length() > 0);

    KeyDrawableStateProvider provider =
        new KeyDrawableStateProvider(
            R.attr.key_type_function,
            R.attr.key_type_action,
            R.attr.action_done,
            R.attr.action_search,
            R.attr.action_go);
    Assert.assertArrayEquals(provider.KEY_STATE_NORMAL, key.getCurrentDrawableState(provider));

    Point keyPoint = ViewTestUtils.getKeyCenterPoint(key);

    ViewTestUtils.navigateFromTo(mViewUnderTest, keyPoint, keyPoint, 400, true, false);
    Assert.assertArrayEquals(provider.KEY_STATE_PRESSED, key.getCurrentDrawableState(provider));

    mViewUnderTest.onTouchEvent(
        MotionEvent.obtain(
            SystemClock.uptimeMillis(),
            SystemClock.uptimeMillis(),
            MotionEvent.ACTION_UP,
            keyPoint.x,
            keyPoint.y,
            0));

    Assert.assertArrayEquals(provider.KEY_STATE_NORMAL, key.getCurrentDrawableState(provider));
  }