X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTTerminalWindow.java;h=58e60e567c15387ffd82379f696af8e1f303ff5a;hb=92554d64c21c6a477fd23a06ca3a64a542b622a3;hp=83cc86ef19d0f5a890699d41ec102d86de8dca50;hpb=a83fea2bae838f4b9bbf59ce3832e0e67be41378;p=fanfix.git diff --git a/src/jexer/TTerminalWindow.java b/src/jexer/TTerminalWindow.java index 83cc86e..58e60e5 100644 --- a/src/jexer/TTerminalWindow.java +++ b/src/jexer/TTerminalWindow.java @@ -297,7 +297,7 @@ public class TTerminalWindow extends TWindow { // The shell is still running, do nothing. } } - + } // synchronized (emulator) } @@ -386,6 +386,15 @@ public class TTerminalWindow extends TWindow { // Get out of scrollback vScroller.setValue(0); emulator.keypress(keypress.getKey()); + + // UGLY HACK TIME! cmd.exe needs CRLF, not just CR, so if + // this is kBEnter then also send kbCtrlJ. + if (System.getProperty("os.name").startsWith("Windows")) { + if (keypress.equals(kbEnter)) { + emulator.keypress(kbCtrlJ); + } + } + readEmulatorState(); return; }