comparison src/com/five_ten_sg/connectbot/service/TerminalBridge.java @ 177:fd4ca38f38c9

add f13 thru f24 keys
author Carl Byington <carl@five-ten-sg.com>
date Wed, 02 Jul 2014 12:39:57 -0700
parents 6e07ea418b90
children 6cef525a3bff
comparison
equal deleted inserted replaced
176:6e07ea418b90 177:fd4ca38f38c9
1260 /** 1260 /**
1261 * Function keys dialog 1261 * Function keys dialog
1262 */ 1262 */
1263 public boolean showFKeysDialog() { 1263 public boolean showFKeysDialog() {
1264 final String pickerString = "1234567890abcdefghijklmn"; 1264 final String pickerString = "1234567890abcdefghijklmn";
1265 HashMap<String,Integer> keymap = new HashMap<String,Integer>(); 1265 final keymap<String,Integer> keymap = new HashMap<String,Integer>();
1266 keymap.put("1", vt320.KEY_F1); 1266 keymap.put("1", vt320.KEY_F1);
1267 keymap.put("2", vt320.KEY_F2); 1267 keymap.put("2", vt320.KEY_F2);
1268 keymap.put("3", vt320.KEY_F3); 1268 keymap.put("3", vt320.KEY_F3);
1269 keymap.put("4", vt320.KEY_F4); 1269 keymap.put("4", vt320.KEY_F4);
1270 keymap.put("5", vt320.KEY_F5); 1270 keymap.put("5", vt320.KEY_F5);
1295 return false; 1295 return false;
1296 1296
1297 CharacterPickerDialog cpd = new CharacterPickerDialog(parent.getContext(), 1297 CharacterPickerDialog cpd = new CharacterPickerDialog(parent.getContext(),
1298 parent, content, pickerString, true) { 1298 parent, content, pickerString, true) {
1299 private void buttonPressed(CharSequence result) { 1299 private void buttonPressed(CharSequence result) {
1300 String s = new String(result); 1300 String s = result.toString();
1301 if (keymap.containsKey(s)) buffer.keyPressed(keymap.get(s), ' ', 0); 1301 if (keymap.containsKey(s)) buffer.keyPressed(keymap.get(s), ' ', 0);
1302 dismiss(); 1302 dismiss();
1303 } 1303 }
1304 @Override 1304 @Override
1305 public void onItemClick(AdapterView p, View v, int pos, long id) { 1305 public void onItemClick(AdapterView p, View v, int pos, long id) {