diff src/com/five_ten_sg/connectbot/service/TerminalMonitor.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/service/TerminalMonitor.java	Sat Jun 21 17:54:29 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java	Sun Jun 22 07:57:20 2014 -0700
@@ -24,7 +24,7 @@
 
     public  static final char MONITOR_CMD_INIT         = 0;
     public  static final char MONITOR_CMD_ACTIVATE     = 1;
-    public  static final char MONITOR_CMD_HOSTDATA     = 2;
+    public  static final char MONITOR_CMD_KEYSTATE     = 2;
     public  static final char MONITOR_CMD_CURSORMOVE   = 3;
     public  static final char MONITOR_CMD_SCREENCHANGE = 4;
     public  static final char MONITOR_CMD_FIELDVALUE   = 5;
@@ -316,16 +316,10 @@
         sendScreen(MONITOR_CMD_ACTIVATE);
     }
 
-    public synchronized void hostData(byte[] b) {
-        for (int i = 0; i < b.length; i++) {
-            hostData((int)b[i] & 0xff);
-        }
-    }
-
-    public synchronized void hostData(int b) {
+    public synchronized void keyState(int b) {
         char[] arg = new char[3];
         arg[2] = (char)(b & 0x0000ffff);
-        monitorWrite(MONITOR_CMD_HOSTDATA, arg);
+        monitorWrite(MONITOR_CMD_KEYSTATE, arg);
     }
 
     public synchronized void cursorMove(int l, int c) {