Mercurial > 510Connectbot
comparison src/org/tn5250j/framework/tn5250/Screen5250.java @ 113:cb3b9b660b3d
depress() keys from the terminal monitor go straight thru buffer.keyPressed() rather than detour though the key listener
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 18 Jun 2014 14:24:00 -0700 |
parents | 77ac18bc1b2f |
children | bc59a399f627 |
comparison
equal
deleted
inserted
replaced
112:77ac18bc1b2f | 113:cb3b9b660b3d |
---|---|
983 boolean done = false; | 983 boolean done = false; |
984 // setCursorOff2(); | 984 // setCursorOff2(); |
985 setCursorActive(false); | 985 setCursorActive(false); |
986 | 986 |
987 while (!done) { | 987 while (!done) { |
988 // while (strokenizer.hasMoreKeyStrokes() && !keyboardLocked | |
989 // && | |
990 // !isStatusErrorCode() && !done) { | |
991 if (strokenizer.hasMoreKeyStrokes()) { | 988 if (strokenizer.hasMoreKeyStrokes()) { |
992 // check to see if position is in a field and if it is | 989 // check to see if position is in a field and if it is |
993 // then change | 990 // then change current field to that field |
994 // current field to that field | |
995 isInField(lastPos, true); | 991 isInField(lastPos, true); |
996 s = strokenizer.nextKeyStroke(); | 992 s = strokenizer.nextKeyStroke(); |
997 | 993 |
998 if (s.length() == 1) { | 994 if (s.length() == 1) { |
999 // setCursorOn(); | |
1000 // if (!keysBuffered) { | |
1001 // System.out.println(" s two" + s); | |
1002 // setCursorOn(); | |
1003 // } | |
1004 // try { new Thread().sleep(400);} catch | |
1005 // (InterruptedException ie) {} | |
1006 simulateKeyStroke(s.charAt(0)); | 995 simulateKeyStroke(s.charAt(0)); |
1007 // System.out.println(" s two " + s + " " + | |
1008 // cursorActive); | |
1009 // if (cursorActive && !keysBuffered) { | |
1010 // System.out.println(" s two" + s); | |
1011 // setCursorOn(); | |
1012 // } | |
1013 } | 996 } |
1014 else { | 997 else { |
1015 simulateMnemonic(getMnemonicValue(s)); | 998 simulateMnemonic(getMnemonicValue(s)); |
1016 // if (!cursorActive && !keysBuffered) { | |
1017 // System.out.println(" m one"); | |
1018 // setCursorOn(); | |
1019 // } | |
1020 } | 999 } |
1021 | 1000 |
1022 if (oia.isKeyBoardLocked()) { | 1001 if (oia.isKeyBoardLocked()) { |
1023 bufferedKeys = strokenizer | 1002 bufferedKeys = strokenizer |
1024 .getUnprocessedKeyStroked(); | 1003 .getUnprocessedKeyStroked(); |
1029 | 1008 |
1030 done = true; | 1009 done = true; |
1031 } | 1010 } |
1032 } | 1011 } |
1033 else { | 1012 else { |
1034 // setCursorActive(true); | |
1035 // setCursorOn(); | |
1036 done = true; | 1013 done = true; |
1037 } | 1014 } |
1038 } | 1015 } |
1039 | 1016 |
1040 setCursorActive(true); | 1017 setCursorActive(true); |
1372 // we toggle it | 1349 // we toggle it |
1373 oia.setInsertMode(oia.isInsertMode() ? false : true); | 1350 oia.setInsertMode(oia.isInsertMode() ? false : true); |
1374 break; | 1351 break; |
1375 | 1352 |
1376 case HOME: | 1353 case HOME: |
1377 | |
1378 // position to the home position set | 1354 // position to the home position set |
1379 if (lastPos + numCols + 1 != homePos) { | 1355 if (lastPos + numCols + 1 != homePos) { |
1380 goto_XY(homePos - numCols - 1); | 1356 goto_XY(homePos - numCols - 1); |
1381 // now check if we are in a field | 1357 // now check if we are in a field |
1382 isInField(lastPos); | 1358 isInField(lastPos); |