Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/transport/TN5250.java @ 165:924523c03ca7
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Tue, 24 Jun 2014 12:39:43 -0700 |
parents | be91eb9743fc |
children | 9d6b581b4656 |
comparison
equal
deleted
inserted
replaced
163:284152c31335 | 165:924523c03ca7 |
---|---|
153 public void write(byte[] b) { | 153 public void write(byte[] b) { |
154 screen52.sendKeys(new String(b)); | 154 screen52.sendKeys(new String(b)); |
155 } | 155 } |
156 @Override | 156 @Override |
157 public void write(int b) { | 157 public void write(int b) { |
158 if (b == 120) { | |
159 // special case x for testing | |
160 setField(17, 44, new char[] { '1', '2' }); | |
161 keyPressed(KEY_TAB, ' ', 0); | |
162 keyPressed(KEY_TAB, ' ', 0); | |
163 setField(-1, -1, new char[] { '3', '4' }); | |
164 setField(18, 44, new char[0]); | |
165 setField(-1, -1, new char[] { '5', '6' }); | |
166 return; | |
167 } | |
168 if (b == 121) { | |
169 // special case y for testing | |
170 setField(17, 44, new char[0]); | |
171 setField(-1, -1, new char[] { '2', '1' }); | |
172 keyPressed(KEY_TAB, ' ', 0); | |
173 keyPressed(KEY_TAB, ' ', 0); | |
174 setField(-1, -1, new char[] { '4', '3' }); | |
175 setField(18, 44, new char[0]); | |
176 setField(-1, -1, new char[] { '6', '5' }); | |
177 return; | |
178 } | |
179 if (b == 122) { | |
180 // special case z for testing | |
181 setField(17, 40, new char[0]); | |
182 return; | |
183 } | |
184 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0); | 158 if (controls.containsKey(b)) keyPressed(controls.get(b), ' ', 0); |
185 else screen52.sendKeys(new String(new byte[] {(byte)b})); | 159 else screen52.sendKeys(new String(new byte[] {(byte)b})); |
186 } | 160 } |
187 @Override | 161 @Override |
188 public void keyPressed(int keyCode, char keyChar, int modifiers) { | 162 public void keyPressed(int keyCode, char keyChar, int modifiers) { |