diff src/com/five_ten_sg/connectbot/transport/TN5250.java @ 147:1350adb077b1

monitor key state tracking
author Carl Byington <carl@five-ten-sg.com>
date Sun, 22 Jun 2014 07:57:20 -0700
parents 4dfa4dd791c1
children 69333ca1563c
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Sat Jun 21 17:54:29 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Sun Jun 22 07:57:20 2014 -0700
@@ -145,8 +145,6 @@
         // terminal key listener sending to local screen
         @Override
         public void write(byte[] b) {
-            if (bridge.monitor != null) bridge.monitor.hostData(b);
-
             screen52.sendKeys(new String(b));
         }
         @Override
@@ -161,25 +159,14 @@
                 setField(-1, -1, new char[] { '4', '5' });
                 return;
             }
-            if (controls.containsKey(b)) {
-                keyPressed(controls.get(b), ' ', 0);
-            }
-            else {
-                if (bridge.monitor != null) bridge.monitor.hostData(b);
-
-                screen52.sendKeys(new String(new byte[] {(byte)b}));
-            }
+            if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0);
+            else                         screen52.sendKeys(new String(new byte[] {(byte)b}));
         }
         @Override
         public void keyPressed(int keyCode, char keyChar, int modifiers) {
             if (mnemonics.containsKey(keyCode)) {
                 String s = mnemonics.get(keyCode);
-
-                if (s != "") {
-                    if (bridge.monitor != null) bridge.monitor.hostData(s.getBytes());
-
-                    screen52.sendKeys(s);
-                }
+                if (s != "") screen52.sendKeys(s);
             }
         }
         // 5250 writing to the screen
@@ -405,8 +392,7 @@
         selection.put(HostDatabase.FIELD_HOST_HOSTNAME, uri.getHost());
         int port = uri.getPort();
 
-        if (port < 0)
-            port = DEFAULT_PORT;
+        if (port < 0) port = DEFAULT_PORT;
 
         selection.put(HostDatabase.FIELD_HOST_PORT, Integer.toString(port));
     }
@@ -419,8 +405,7 @@
         host.setHostname(uri.getHost());
         int port = uri.getPort();
 
-        if (port < 0)
-            port = DEFAULT_PORT;
+        if (port < 0) port = DEFAULT_PORT;
 
         host.setPort(port);
         String nickname = uri.getFragment();