changeset 205:f86f1e37b504

add cursor request command to the TE
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Jul 2014 08:46:25 -0700
parents aab87298244f
children f60d4b1e8c39
files AndroidManifest.xml src/com/five_ten_sg/connectbot/service/TerminalMonitor.java src/com/five_ten_sg/connectbot/transport/TN5250.java
diffstat 3 files changed, 14 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/AndroidManifest.xml	Wed Jul 02 22:20:20 2014 -0700
+++ b/AndroidManifest.xml	Thu Jul 03 08:46:25 2014 -0700
@@ -17,7 +17,7 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 	package="com.five_ten_sg.connectbot"
-	android:versionName="1.8.2-1"
+	android:versionName="1.8.3-1"
 	android:versionCode="1"
 	android:installLocation="auto">
 
--- a/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java	Wed Jul 02 22:20:20 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java	Thu Jul 03 08:46:25 2014 -0700
@@ -39,6 +39,7 @@
     public  static final char MONITOR_CMD_DEPRESS       = 8;
     public  static final char MONITOR_CMD_SHOWURL       = 9;
     public  static final char MONITOR_CMD_SWITCHSESSION = 10;
+    public  static final char MONITOR_CMD_CURSORREQUEST = 11;
 
     private static final int    MONITORPORT       = 6000;
     private static final String LOCALHOST         = "127.0.0.1";
@@ -142,6 +143,12 @@
 
                             break;
 
+                        case MONITOR_CMD_CURSORREQUEST:
+                            if (packet.length == 1)
+                                cursorRequest();
+
+                            break;
+
                         default:
                             break;
                     }
@@ -447,4 +454,10 @@
         parent.startActivity(intent);
     }
 
+
+    public synchronized void cursorRequest() {
+        Log.i(TAG, "cursorRequest()");
+        testChanged();
+    }
+
 }
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Wed Jul 02 22:20:20 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Thu Jul 03 08:46:25 2014 -0700
@@ -181,26 +181,6 @@
         }
         @Override
         public void write(int b) {
-            if (b == 120) {
-                // special case x for testing
-                setField(17, 44, new char[] { '1', '2' });
-                keyPressed(KEY_TAB, ' ', 0);
-                keyPressed(KEY_TAB, ' ', 0);
-                setField(-1, -1, new char[] { '3', '4' });
-                setField(18, 44, new char[0]);
-                setField(-1, -1, new char[] { '5', '6' });
-                return;
-            }
-            if (b == 121) {
-                // special case y for testing
-                setField(17, 43, new char[0]);
-                return;
-            }
-            if (b == 122) {
-                // special case z for testing
-                setField(17, 41, new char[0]);
-                return;
-            }
             if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0);
             else                         screen52.sendKeys(new String(new byte[] {(byte)b}));
             testChanged();