Mercurial > 510Connectbot
diff app/src/main/java/de/mud/terminal/vt320.java @ 496:f698820bffdf
add socket2 monitor protocol
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 05 Jun 2022 14:46:41 -0700 |
parents | d29cce60f393 |
children |
line wrap: on
line diff
--- a/app/src/main/java/de/mud/terminal/vt320.java Sun Jun 05 12:00:10 2022 -0700 +++ b/app/src/main/java/de/mud/terminal/vt320.java Sun Jun 05 14:46:41 2022 -0700 @@ -65,9 +65,7 @@ /* do nothing by default */ } - /** - * inject field contents as if typed - */ + // monitor injecting a field public void setField(int l, int c, char [] d) { // ignore line and column, just send the bytes to the host. int n = d.length; @@ -78,14 +76,20 @@ write(b); } + // monitor simulating function key depress + public void keyDepressed(int keyCode) { + keyPressed(keyCode, ' ', 0); + } + + // monitor simulating ascii key depress + public void keyUnicodeDepressed(int keyCode) { + write((byte)(keyCode & 0x00ff)); + } + public void monitorKey(boolean down) { // do nothing } - public void keyDepressed(int keyCode, char keyChar, int modifiers) { - keyPressed(keyCode, keyChar, modifiers); - } - /** * Play the beep sound ... */