comparison src/com/five_ten_sg/connectbot/transport/TN5250.java @ 212:4ecd8a39afb3

cursor movement reporting changes
author Carl Byington <carl@five-ten-sg.com>
date Mon, 07 Jul 2014 12:32:22 -0700
parents 53f66625d618
children d198328918fe
comparison
equal deleted inserted replaced
211:7e4352b53f24 212:4ecd8a39afb3
175 175
176 // terminal key listener sending to local screen 176 // terminal key listener sending to local screen
177 @Override 177 @Override
178 public void write(byte[] b) { 178 public void write(byte[] b) {
179 screen52.sendKeys(new String(b)); 179 screen52.sendKeys(new String(b));
180 testChanged(); 180 cursorMoved();
181 } 181 }
182 @Override 182 @Override
183 public void write(int b) { 183 public void write(int b) {
184 /*
185 if (b == 120) {
186 // special case x for testing
187 setField(17, 40, new char[] { '1', '2' });
188 setField(17, 44, new char[0]);
189 setField(-1, -1, new char[] { '3', '4' });
190 setField(18, 40, new char[0]);
191 setField(-1, -1, new char[] { '5', '6' });
192 return;
193 }
194 if (b == 121) {
195 // special case y for testing
196 setField(17, 43, new char[0]);
197 return;
198 }
199 if (b == 122) {
200 // special case z for testing
201 setField(17, 41, new char[0]);
202 return;
203 }
204 */
205 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0); 184 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0);
206 else screen52.sendKeys(new String(new byte[] {(byte)b})); 185 else screen52.sendKeys(new String(new byte[] {(byte)b}));
207 testChanged(); 186 cursorMoved();
208 } 187 }
209 @Override 188 @Override
210 public void keyPressed(int keyCode, char keyChar, int modifiers) { 189 public void keyPressed(int keyCode, char keyChar, int modifiers) {
211 keyDepressed(keyCode, keyChar, modifiers); 190 keyDepressed(keyCode, keyChar, modifiers);
212 testChanged(); 191 cursorMoved();
213 } 192 }
214 193
215 // 5250 writing to the screen 194 // 5250 writing to the screen
216 // test for changed screen contents 195 // test for changed screen contents
217 @Override 196 @Override