diff src/com/five_ten_sg/connectbot/transport/TN5250.java @ 52:0e3fc85d0586 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Wed, 11 Jun 2014 12:18:18 -0700
parents 8c6de858bb73
children e872762ec105
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Wed Jun 11 11:54:52 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Wed Jun 11 12:18:18 2014 -0700
@@ -153,7 +153,7 @@
                         else if (keyCode == KeyEvent.KEYCODE_SHIFT_RIGHT
                                  && (metaState & META_TAB) != 0) {
                             metaState &= ~(META_TAB | META_TRANSIENT);
-                            buffer.write("[tab]");
+                            sendEncoded("[tab]");
                             return true;
                         }
                     }
@@ -167,7 +167,7 @@
                         else if (keyCode == KeyEvent.KEYCODE_SHIFT_LEFT
                                  && (metaState & META_TAB) != 0) {
                             metaState &= ~(META_TAB | META_TRANSIENT);
-                            buffer.write("[tab]");
+                            sendEncoded("[tab]");
                             return true;
                         }
                     }
@@ -270,7 +270,7 @@
                     if (uchar < 0x80)
                         buffer.write(uchar);
                     else
-                        buffer.write(new String(Character.toChars(uchar)).getBytes(encoding));
+                        sendEncoded(new String(Character.toChars(uchar)));
 
                     return true;
                 }
@@ -400,29 +400,29 @@
                         return true;
 
                     case KeyEvent.KEYCODE_TAB:
-                        buffer.write("[tab]");
+                        sendEncoded("[tab]");
                         return true;
 
                     case KEYCODE_PAGE_DOWN:
-                        buffer.write("[pgdown]");
+                        sendEncoded("[pgdown]");
                         metaState &= ~META_TRANSIENT;
                         bridge.tryKeyVibrate();
                         return true;
 
                     case KEYCODE_PAGE_UP:
-                        buffer.write("[pgup]");
+                        sendEncoded("[pgup]");
                         metaState &= ~META_TRANSIENT;
                         bridge.tryKeyVibrate();
                         return true;
 
                     case KeyEvent.KEYCODE_MOVE_HOME:
-                        buffer.write("[home]");
+                        sendEncoded("[home]");
                         metaState &= ~META_TRANSIENT;
                         bridge.tryKeyVibrate();
                         return true;
 
                     case KeyEvent.KEYCODE_MOVE_END:
-                        buffer.write("[end]");  // does not exist!!
+                        sendEncoded("[end]");  // does not exist!!
                         metaState &= ~META_TRANSIENT;
                         bridge.tryKeyVibrate();
                         return true;
@@ -457,17 +457,17 @@
 
                     case KeyEvent.KEYCODE_DEL:
                         if ((metaState & META_ALT_MASK) != 0) {
-                            buffer.write("[insert]");
+                            sendEncoded("[insert]");
                         }
                         else {
-                            buffer.write("[backspace]");
+                            sendEncoded("[backspace]");
                         }
 
                         metaState &= ~META_TRANSIENT;
                         return true;
 
                     case KeyEvent.KEYCODE_ENTER:
-                        buffer.write("[enter]");
+                        sendEncoded("[enter]");
                         metaState &= ~META_TRANSIENT;
                         return true;
 
@@ -478,10 +478,10 @@
                         }
                         else {
                             if ((metaState & META_ALT_MASK) != 0) {
-                                buffer.write("[home]");
+                                sendEncoded("[home]");
                             }
                             else {
-                                buffer.write("[left]");
+                                sendEncoded("[left]");
                             }
 
                             metaState &= ~META_TRANSIENT;
@@ -497,10 +497,10 @@
                         }
                         else {
                             if ((metaState & META_ALT_MASK) != 0) {
-                                buffer.write("[pgup]");
+                                sendEncoded("[pgup]");
                             }
                             else {
-                                buffer.write("[up]");
+                                sendEncoded("[up]");
                             }
 
                             metaState &= ~META_TRANSIENT;
@@ -516,10 +516,10 @@
                         }
                         else {
                             if ((metaState & META_ALT_MASK) != 0) {
-                                buffer.write("[pgdown]");
+                                sendEncoded("[pgdown]");
                             }
                             else {
-                                buffer.write("[down]");
+                                sendEncoded("[down]");
                             }
 
                             metaState &= ~META_TRANSIENT;
@@ -535,10 +535,10 @@
                         }
                         else {
                             if ((metaState & META_ALT_MASK) != 0) {
-                                buffer.write("[end]");
+                                sendEncoded("[end]");   // does not exist!!
                             }
                             else {
-                                buffer.write("[right]");
+                                sendEncoded("[right]");
                             }
 
                             metaState &= ~META_TRANSIENT;