From: Kevin Lamonte Date: Mon, 6 Mar 2017 17:26:43 +0000 (-0500) Subject: Support Shift-Tab X-Git-Tag: fanfix-swing-0.0.1~12^2~13^2~283 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=f1c4c25e3e5c89aff7da36caaba1a94ecc379e4d;p=fanfix-swing.git Support Shift-Tab --- diff --git a/src/jexer/demos/Demo3.java b/src/jexer/demos/Demo3.java index b8181bd1..57122969 100644 --- a/src/jexer/demos/Demo3.java +++ b/src/jexer/demos/Demo3.java @@ -44,10 +44,6 @@ public class Demo3 { */ public static void main(final String [] args) { try { - if (args.length == 0) { - System.err.printf("USAGE: java -cp jexer.jar jexer.demos.Demo3\n"); - return; - } DemoApplication app = new DemoApplication(System.in, new InputStreamReader(System.in, "UTF-8"), new PrintWriter(new OutputStreamWriter(System.out, "UTF-8")), diff --git a/src/jexer/tterminal/ECMA48.java b/src/jexer/tterminal/ECMA48.java index 97c9b417..78698297 100644 --- a/src/jexer/tterminal/ECMA48.java +++ b/src/jexer/tterminal/ECMA48.java @@ -698,7 +698,7 @@ public class ECMA48 implements Runnable { return columns132; } - /** + /** * true = reverse video. Set by DECSCNM. */ private boolean reverseVideo = false; @@ -1916,6 +1916,17 @@ public class ECMA48 implements Runnable { return "\011"; } + if ((keypress.equalsWithoutModifiers(kbBackTab)) || + (keypress.equals(kbShiftTab)) + ) { + switch (type) { + case XTERM: + return "\033[Z"; + default: + return "\011"; + } + } + // Non-alt, non-ctrl characters if (!keypress.isFnKey()) { StringBuilder sb = new StringBuilder();