Class HostSendKeys

  • All Implemented Interfaces:
    TerminalKeys

    public class HostSendKeys
    extends java.lang.Object
    implements TerminalKeys
    Handles conversion of H-L-L-A-P-I send keys to indexed values defined in this class. Also used for migrating N-e-t-P-h-a-n-t-o-m applications.
    Author:
    Christopher Mindus
    • Field Detail

      • sendKey

        public static final java.lang.String[] sendKey
        The table of indexed send keys. The index comes from send keys for push buttons, menu items and notebook pages.

        The index is increased by one, so getting the send key would be like:

           String s=HostSendKeys.sendKey[sendKey-1];
         
        Available send keys are:
         SendKey   Description        Index
         --------  -----------------  -----
         *E        Enter                01
         *u        Page Up              02
         *v        Page Down            03
         *1        PF1/f1               04
         *2        PF2/f2               05
         *3        PF3/f3               06
         *4        PF4/f4               07
         *5        PF5/f5               08
         *6        PF6/f6               09
         *7        PF7/f7               10
         *8        PF8/f8               11
         *9        PF9/f9               12
         *a        PF10/f10             13
         *b        PF11/f11             14
         *c        PF12/f12             15
         *d        PF13                 16
         *e        PF14                 17
         *f        PF15                 18
         *g        PF16                 19
         *h        PF17                 20
         *i        PF18                 21
         *j        PF19                 22
         *k        PF20                 23
         *l        PF21                 24
         *m        PF22                 25
         *n        PF23                 26
         *o        PF24                 27
         *H        Help                 28
         *R        Reset                29
         *C        Clear                30
         *P        Print                31
         *0        Home                 32
         *q        End                  33
         *A*E      Field Exit           34
         *A*+      Field +              35
         *A*-      Field -              36
         *A*H      System Request       37
         *A*Q      Attention            38
         *x        PA1                  39
         *y        PA2                  40
         *z        PA3                  41
         *A*C      Test request         42
         

      • toHostSendKey

        public static final int[] toHostSendKey
        Converts send key index to host send key. This table is used for migration of applications.
        See Also:
        getSendKeyFromPhantomIndex(int)
    • Method Detail

      • getSendKey

        public static java.lang.String getSendKey​(java.lang.String s)
        Gets a HLLAPI send string from a string.
        Parameters:
        s - The key string.
        Returns:
        The send string such as *E or *A*E or null if not found.
      • getSendKeyIndex

        public static int getSendKeyIndex​(java.lang.String s)
        Gets a key index from a HLLAPI send string.
        Parameters:
        s - The key string.
        Returns:
        Index of key (0-94) or -1 if not found.
      • getSendKeyFromPhantomIndex

        public static int getSendKeyFromPhantomIndex​(int index)
        Get host send key from send key index.
        Parameters:
        index - The key index.
        Returns:
        -1 if index is invalid.
      • getSendKeyDescription

        public static java.lang.String getSendKeyDescription​(int sendKey)
        Gets the Send Key description.
        Parameters:
        sendKey - The send key value (0=none, 1=Enter, ...) as defined in the ScreenActionProp.
        Returns:
        String The description, or null for none.