public void disableInterruptCharacter() { try { intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } settings.undef("intr"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable interrupt character", e); } }
public void disableLitteralNextCharacter() { try { lnext = getSettings().getPropertyAsString("lnext"); if ("<undef>".equals(lnext)) { lnext = null; } settings.undef("lnext"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable litteral next character", e); } }
@Override public void init() throws Exception { super.init(); intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } if (intr != null) { getSettings().undef("intr"); } }
/** * Remove line-buffered input by invoking "stty -icanon min 1" * against the current terminal. */ @Override public void init() throws Exception { super.init(); setAnsiSupported(true); // Set the console to be character-buffered instead of line-buffered. // Make sure we're distinguishing carriage return from newline. // Allow ctrl-s keypress to be used (as forward search) // // Please note that FreeBSD does not seem to support -icrnl and thus // has to be handled separately. Otherwise the console will be "stuck" // and will neither accept input nor print anything to stdout. if (Configuration.getOsName().contains(TerminalFactory.FREEBSD)) { settings.set("-icanon min 1 -inlcr -ixon"); } else { settings.set("-icanon min 1 -icrnl -inlcr -ixon"); } settings.undef("dsusp"); setEchoEnabled(false); parseInfoCmp(); }
public void disableInterruptCharacter() { try { intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } settings.undef("intr"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable interrupt character", e); } }
public void disableLitteralNextCharacter() { try { lnext = getSettings().getPropertyAsString("lnext"); if ("<undef>".equals(lnext)) { lnext = null; } settings.undef("lnext"); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); } Log.error("Failed to disable litteral next character", e); } }
@Override public void init() throws Exception { super.init(); intr = getSettings().getPropertyAsString("intr"); if ("<undef>".equals(intr)) { intr = null; } if (intr != null) { getSettings().undef("intr"); } }
/** * Remove line-buffered input by invoking "stty -icanon min 1" * against the current terminal. */ @Override public void init() throws Exception { super.init(); setAnsiSupported(true); // Set the console to be character-buffered instead of line-buffered. // Make sure we're distinguishing carriage return from newline. // Allow ctrl-s keypress to be used (as forward search) // // Please note that FreeBSD does not seem to support -icrnl and thus // has to be handled separately. Otherwise the console will be "stuck" // and will neither accept input nor print anything to stdout. if (Configuration.getOsName().contains(TerminalFactory.FREEBSD)) { settings.set("-icanon min 1 -inlcr -ixon"); } else { settings.set("-icanon min 1 -icrnl -inlcr -ixon"); } settings.undef("dsusp"); setEchoEnabled(false); parseInfoCmp(); }