Mercurial > 510Connectbot
comparison src/de/mud/terminal/vt320.java @ 79:01d939969b10
merge tn5250 branch into default
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 16 Jun 2014 08:24:00 -0700 |
parents | 8181cb01c64d |
children | 171e0a977544 |
comparison
equal
deleted
inserted
replaced
19:b3d0d806cbe2 | 79:01d939969b10 |
---|---|
37 * @version $Id: vt320.java 507 2005-10-25 10:14:52Z marcus $ | 37 * @version $Id: vt320.java 507 2005-10-25 10:14:52Z marcus $ |
38 * @author Matthias L. Jugel, Marcus Meißner | 38 * @author Matthias L. Jugel, Marcus Meißner |
39 */ | 39 */ |
40 public abstract class vt320 extends VDUBuffer implements VDUInput { | 40 public abstract class vt320 extends VDUBuffer implements VDUInput { |
41 | 41 |
42 /** The current version id tag.<P> | |
43 * $Id: vt320.java 507 2005-10-25 10:14:52Z marcus $ | |
44 * | |
45 */ | |
46 public final static String ID = "$Id: vt320.java 507 2005-10-25 10:14:52Z marcus $"; | |
47 | |
48 /** the debug level */ | 42 /** the debug level */ |
49 private final static int debug = 0; | 43 private final static int debug = 0; |
50 private StringBuilder debugStr; | 44 private StringBuilder debugStr; |
51 public abstract void debug(String notice); | 45 public abstract void debug(String notice); |
52 | 46 |
70 public void testChanged() { | 64 public void testChanged() { |
71 /* do nothing by default */ | 65 /* do nothing by default */ |
72 } | 66 } |
73 | 67 |
74 /** | 68 /** |
69 * inject field contents as if typed | |
70 */ | |
71 public void setField(int l, int c, char [] d) { | |
72 // ignore line and column, just send the bytes to the host. | |
73 int n = d.length; | |
74 byte [] b = new byte [n]; | |
75 for (int i=0; i<n; i++) b[i] = (byte)(d[i] & 0x00ff); | |
76 write(b); | |
77 } | |
78 | |
79 /** | |
75 * Play the beep sound ... | 80 * Play the beep sound ... |
76 */ | 81 */ |
77 public void beep() { | 82 public void beep() { |
78 /* do nothing by default */ | 83 /* do nothing by default */ |
84 } | |
85 | |
86 public void redrawPassthru() { | |
87 redraw(); // VDUBuffer.redraw is protected | |
79 } | 88 } |
80 | 89 |
81 /** | 90 /** |
82 * Convenience function for putString(char[], int, int) | 91 * Convenience function for putString(char[], int, int) |
83 */ | 92 */ |
739 public final static int KEY_NUMPAD6 = 37; | 748 public final static int KEY_NUMPAD6 = 37; |
740 public final static int KEY_NUMPAD7 = 38; | 749 public final static int KEY_NUMPAD7 = 38; |
741 public final static int KEY_NUMPAD8 = 39; | 750 public final static int KEY_NUMPAD8 = 39; |
742 public final static int KEY_NUMPAD9 = 40; | 751 public final static int KEY_NUMPAD9 = 40; |
743 public final static int KEY_DECIMAL = 41; | 752 public final static int KEY_DECIMAL = 41; |
744 public final static int KEY_ADD = 42; | 753 public final static int KEY_ADD = 42; |
745 public final static int KEY_ESCAPE = 43; | 754 public final static int KEY_ESCAPE = 43; |
755 public final static int KEY_TAB = 44; | |
746 | 756 |
747 public final static int DELETE_IS_DEL = 0; | 757 public final static int DELETE_IS_DEL = 0; |
748 public final static int DELETE_IS_BACKSPACE = 1; | 758 public final static int DELETE_IS_BACKSPACE = 1; |
749 | 759 |
750 /* The graphics charsets | 760 /* The graphics charsets |
1092 | 1102 |
1093 break; | 1103 break; |
1094 | 1104 |
1095 case KEY_CAPS_LOCK: | 1105 case KEY_CAPS_LOCK: |
1096 capslock = !capslock; | 1106 capslock = !capslock; |
1097 return; | 1107 break; |
1098 | 1108 |
1099 case KEY_SHIFT: | 1109 case KEY_SHIFT: |
1100 case KEY_CONTROL: | 1110 case KEY_CONTROL: |
1101 case KEY_ALT: | 1111 case KEY_ALT: |
1102 return; | 1112 break; |
1113 | |
1114 case KEY_ESCAPE: | |
1115 write(0x1b); | |
1116 break; | |
1117 | |
1118 case KEY_ENTER: | |
1119 write(0x0d); | |
1120 break; | |
1121 | |
1122 case KEY_TAB: | |
1123 write(0x09); | |
1124 break; | |
1103 | 1125 |
1104 default: | 1126 default: |
1105 break; | 1127 break; |
1106 } | 1128 } |
1107 } | 1129 } |