예제 #1
0
  public void onKeyTapped(final char tappedKey) {
    popupKeyboardWindow.dismiss();
    enqueue(
        new Runnable() {
          @Override
          public void run() {
            Timer timer = new Timer();

            final InputConnection inputConnection = getCurrentInputConnection();
            if (inputConnection == null) {
              return;
            }

            inputConnection.commitText(Character.toString(tappedKey), 1);
            Timber.d("PERF: Committing a char took %s", timer);
            LoggingUtils.logCustom(
                new CustomEvent(PERF_EVENT).putCustomAttribute("Commit char ms", timer.getMs()));
          }
        });

    mode.register(ExactypeMode.Event.INSERT_CHAR);
  }
예제 #2
0
 public void onKeyboardModeSwitchRequested() {
   mode.register(ExactypeMode.Event.NEXT_MODE);
 }
예제 #3
0
  public void onLongPress(float x, float y) {
    feedbackWindow.show(x, y);

    mode.register(ExactypeMode.Event.LONG_PRESS);
  }