changeset 166:9d6b581b4656

add ctrl keys for attn and sysreq
author Carl Byington <carl@five-ten-sg.com>
date Tue, 24 Jun 2014 12:46:23 -0700
parents 924523c03ca7
children 9000d274d470
files src/com/five_ten_sg/connectbot/transport/TN5250.java src/de/mud/terminal/vt320.java
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Tue Jun 24 12:39:43 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Tue Jun 24 12:46:23 2014 -0700
@@ -80,10 +80,13 @@
         public vt320x5250(int width, int height) {
             super(width, height);
             controls = new HashMap<Integer, Integer>();
+            controls.put(0x01, KEY_PAUSE);      // ctrl-a -> [attn]
             controls.put(0x08, KEY_BACK_SPACE);
             controls.put(0x09, KEY_TAB);
             controls.put(0x0d, KEY_ENTER);
-            controls.put(0x1b, KEY_ESCAPE);
+            controls.put(0x12, KEY_ESCAPE);     // ctrl-r -> [reset]
+            controls.put(0x13, KEY_SYSREQ);     // ctrl-s -> [sysreq]
+            controls.put(0x1b, KEY_ESCAPE);     // esc    -> [reset]
             mnemonics = new HashMap<Integer, String>();
             mnemonics.put(KEY_PAUSE       , "[attn]");
             mnemonics.put(KEY_F1          , "[pf1]");
@@ -129,6 +132,7 @@
             mnemonics.put(KEY_ADD         , "+");
             mnemonics.put(KEY_ESCAPE      , "[reset]");
             mnemonics.put(KEY_TAB         , "[tab]");
+            mnemonics.put(KEY_SYSREQ      , "[sysreq]");
         }
 
         @Override
--- a/src/de/mud/terminal/vt320.java	Tue Jun 24 12:39:43 2014 -0700
+++ b/src/de/mud/terminal/vt320.java	Tue Jun 24 12:46:23 2014 -0700
@@ -759,6 +759,8 @@
     public final static int KEY_ADD     = 42;
     public final static int KEY_ESCAPE  = 43;
     public final static int KEY_TAB     = 44;
+    public final static int KEY_TAB     = 44;
+    public final static int KEY_SYSREQ  = 45;   // only used by tn5250
 
     public final static int DELETE_IS_DEL = 0;
     public final static int DELETE_IS_BACKSPACE = 1;