comparison src/com/five_ten_sg/connectbot/service/TerminalBridge.java @ 58:79aaf30947e2 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Wed, 11 Jun 2014 15:31:22 -0700
parents a3fd10a8c0de
children 228273d69ca4
comparison
equal deleted inserted replaced
57:e0c68988fe2e 58:79aaf30947e2
1135 buffer.keyPressed(vt320.KEY_RIGHT, ' ', 0); 1135 buffer.keyPressed(vt320.KEY_RIGHT, ' ', 0);
1136 else if (result.equals("↑")) 1136 else if (result.equals("↑"))
1137 buffer.keyPressed(vt320.KEY_UP, ' ', 0); 1137 buffer.keyPressed(vt320.KEY_UP, ' ', 0);
1138 else if (result.equals("↓")) 1138 else if (result.equals("↓"))
1139 buffer.keyPressed(vt320.KEY_DOWN, ' ', 0); 1139 buffer.keyPressed(vt320.KEY_DOWN, ' ', 0);
1140 else if (result.equals("T"))
1141 buffer.keyPressed(vt320.KEY_TAB, ' ', 0);
1140 else if (result.equals("I")) 1142 else if (result.equals("I"))
1141 buffer.keyPressed(vt320.KEY_INSERT, ' ', 0); 1143 buffer.keyPressed(vt320.KEY_INSERT, ' ', 0);
1142 else if (result.equals("D")) 1144 else if (result.equals("D"))
1143 buffer.keyPressed(vt320.KEY_DELETE, ' ', 0); 1145 buffer.keyPressed(vt320.KEY_DELETE, ' ', 0);
1144 else if (result.equals("E")) 1146 else if (result.equals("E"))
1145 buffer.keyTyped(vt320.KEY_ENTER, ' ', 0); 1147 buffer.keyPressed(vt320.KEY_ENTER, ' ', 0);
1146 else if (result.equals("T")) {
1147 try {
1148 transport.write(0x09);
1149 }
1150 catch (IOException e) {
1151 Log.e(TAG, "Problem with the arrowsDialog", e);
1152 }
1153 } 1148 }
1154 } 1149 }
1155 @Override 1150 @Override
1156 public void onItemClick(AdapterView p, View v, int pos, long id) { 1151 public void onItemClick(AdapterView p, View v, int pos, long id) {
1157 final String result = String.valueOf(pickerString.charAt(pos)); 1152 final String result = String.valueOf(pickerString.charAt(pos));
1289 else if (result.equals("9")) 1284 else if (result.equals("9"))
1290 key = vt320.KEY_F9; 1285 key = vt320.KEY_F9;
1291 else if (result.equals("0")) 1286 else if (result.equals("0"))
1292 key = vt320.KEY_F10; 1287 key = vt320.KEY_F10;
1293 1288
1294 if (key != 0) 1289 if (key != 0) buffer.keyPressed(key, ' ', 0);
1295 buffer.keyPressed(key, ' ', 0);
1296 1290
1297 dismiss(); 1291 dismiss();
1298 } 1292 }
1299 @Override 1293 @Override
1300 public void onItemClick(AdapterView p, View v, int pos, long id) { 1294 public void onItemClick(AdapterView p, View v, int pos, long id) {