Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/transport/TN5250.java @ 144:03af90a2f0a9
testing key codes
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 21 Jun 2014 16:27:49 -0700 |
parents | 63f0f0267545 |
children | 4dfa4dd791c1 |
comparison
equal
deleted
inserted
replaced
143:63f0f0267545 | 144:03af90a2f0a9 |
---|---|
145 | 145 |
146 // terminal key listener sending to local screen | 146 // terminal key listener sending to local screen |
147 @Override | 147 @Override |
148 public void write(byte[] b) { | 148 public void write(byte[] b) { |
149 if (bridge.monitor != null) bridge.monitor.hostData(b); | 149 if (bridge.monitor != null) bridge.monitor.hostData(b); |
150 | |
151 screen52.sendKeys(new String(b)); | |
152 } | |
153 @Override | |
154 public void write(int b) { | |
150 if (b == 120) { | 155 if (b == 120) { |
151 // special case x for testing | 156 // special case x for testing |
152 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_F3); | 157 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_F3); |
153 keyListener.onKey(bridge.parent, event.getKeyCode(), event); | 158 keyListener.onKey(bridge.parent, event.getKeyCode(), event); |
154 return; | 159 return; |
155 } | 160 } |
156 screen52.sendKeys(new String(b)); | |
157 } | |
158 @Override | |
159 public void write(int b) { | |
160 if (controls.containsKey(b)) { | 161 if (controls.containsKey(b)) { |
161 keyPressed(controls.get(b), ' ', 0); | 162 keyPressed(controls.get(b), ' ', 0); |
162 } | 163 } |
163 else { | 164 else { |
164 if (bridge.monitor != null) bridge.monitor.hostData(b); | 165 if (bridge.monitor != null) bridge.monitor.hostData(b); |