Support Shift-Tab
[fanfix.git] / src / jexer / tterminal / ECMA48.java
index 97c9b41711624adef14e228d01b2049598b6b050..7869829753df190c64306b51583731f3d812faec 100644 (file)
@@ -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();