TerminalStarter (@NotNull JediTerminal terminal, @NotNull TtyConnector connector) { return new TerminalStarter(terminal, connector, myDataStream, myTerminalWidget.getTypeAheadManager(), getExecutorServiceManager()) { @Override public byte[] getCode(int key, int modifiers) { if (key == KeyEvent.VK_ENTER && modifiers == 0 && myEnterKeyDefaultCodeEnabled) { PtyProcess process = getPtyProcess(); return process != null ? new byte[]{process.getEnterKeyCode()} : LineSeparator.CR.getSeparatorBytes(); } return super.getCode(key, modifiers); } }; }