in core/src/com/jediterm/terminal/emulator/JediEmulator.java [38:94]
public void processChar(char ch, Terminal terminal) throws IOException {
switch (ch) {
case 0:
break;
case Ascii.BEL: //Bell (Ctrl-G)
terminal.beep();
break;
case Ascii.BS: //Backspace (Ctrl-H)
terminal.backspace();
break;
case Ascii.CR: //Carriage return (Ctrl-M)
terminal.carriageReturn();
break;
case Ascii.ENQ: //Return terminal status (Ctrl-E). Default response is an empty string
unsupported("Terminal status:" + escapeSequenceToString(ch));
break;
case Ascii.FF: //Form Feed or New Page (NP). Ctrl-L treated the same as LF
case Ascii.LF: //Line Feed or New Line (NL). (LF is Ctrl-J)
case Ascii.VT: //Vertical Tab (Ctrl-K). This is treated the same as LF.
// '\n'
terminal.newLine();
break;
case Ascii.SI: //Shift In (Ctrl-O) -> Switch to Standard Character Set. This invokes the G0 character set (the default)
//LS0 (locking shift 0)
//Map G0 into GL
terminal.mapCharsetToGL(0);
break;
case Ascii.SO: //Shift Out (Ctrl-N) -> Switch to Alternate Character Set. This invokes the G1 character set (the default)
//LS1 (locking shift 1)
//Map G1 into GL
if (Boolean.getBoolean("jediterm.enable.shift_out.character.support")) {
terminal.mapCharsetToGL(1);
}
break;
case Ascii.HT: // Horizontal Tab (HT) (Ctrl-I)
terminal.horizontalTab();
break;
case Ascii.ESC: // ESC
processEscapeSequence(myDataStream.getChar(), myTerminal);
break;
case SystemCommandSequence.OSC:
processOsc();
break;
default:
if (ch <= Ascii.US) {
StringBuilder sb = new StringBuilder("Unhandled control character:");
CharUtils.appendChar(sb, CharUtils.CharacterType.NONE, ch);
unhandledLogThrottler(sb.toString());
} else { // Plain characters
myDataStream.pushChar(ch);
String nonControlCharacters = readNonControlCharacters(terminal.distanceToLineEnd(), terminal.ambiguousCharsAreDoubleWidth());
terminal.writeCharacters(nonControlCharacters);
}
break;
}
}