code: private void keyTyped(KeyEvent event) {
          String text = event.getCharacter();
          int n = text.length();
  
          if(n == 0) {
              return;
          }
  
          view.replaceSelection(text);
      }
docs: /* ********************************************************************** *
  Key handling implementation                                            *
  **********************************************************************