Rocket U2 | UniVerse & UniData

 View Only
  • 1.  VT100 Function keys / !GET.KEY

    Posted 03-02-2021 14:38
    I am trying to port some jBase programming that used to allow for PGUP/PGDN/arrow keys/CTRL-A/CTRL-E to Universe.  It appears the best choice for this is the special !GET.KEY subroutine.  When trying to test this out, I am seeing odd results when running the sample program from the documentation.  ​

    Here is what I see what I press the RIGHT ARROW:
    01 SINGLE.INPUT
    Type a character or press a function key (q to quit):
    CODE = -1 (Unrecognised function key)
    STRING = CHAR(27) CHAR(91)
    Type a character or press a function key (q to quit):
    CODE = 0 (Normal character)
    STRING = CHAR(68)
    Type a character or press a function key (q to quit):

    Here is what I see when I press PGUP:
    01 SINGLE.INPUT
    Type a character or press a function key (q to quit):
    CODE = -1 (Unrecognised function key)
    STRING = CHAR(27) CHAR(79) CHAR(82)
    Type a character or press a function key (q to quit):

    Notice how the PGUP returned one string with all the values and RIGHT ARROW returned TWO strings, broken up... any thoughts as to why that is occurring?  

    Lastly, I did check the TERM setup... looks to be VT100:
    >TERM
    Terminal Printer

    Page width: 79 132
    Page depth: 24 59
    Page skip : 0
    LF delay : 0
    FF delay : 2
    Backspace : 8
    vt100

    Thanks,
    Larry


    ------------------------------
    Lawrence Rizzo
    Independent Software Developer
    LJR Technology Consulting LLC
    ------------------------------


  • 2.  RE: VT100 Function keys / !GET.KEY

    PARTNER
    Posted 03-02-2021 17:18
    The !GET.KEY subroutine parses escape sequences and detects other control characters based on definitions contained in a record in the SYS.TERMINALS file called terminal.IKBIND, e.g., VT100.IKBIND. Looking at that file, I see:

    \e[C \* Cursor Right \* CURSOR.RIGHT

    and

    \eOQ \* PF2 \* PREV.PAGE

    Try doing "SET.TERM.TYPE VT100" followed by "COMMAND.EDITOR ON ALL" and see if the behavior changes.


    ------------------------------
    Henry Unger
    President
    Pulsiam
    Encino CA United States
    ------------------------------



  • 3.  RE: VT100 Function keys / !GET.KEY

    Posted 03-02-2021 17:46
    Henry... that did the trick!  THANK YOU for the quick response!

    ------------------------------
    Lawrence Rizzo
    Independent Software Developer
    LJR Technology Consulting LLC
    ------------------------------



  • 4.  RE: VT100 Function keys / !GET.KEY

    PARTNER
    Posted 03-02-2021 17:55
    My pleasure!

    ------------------------------
    Henry Unger
    President
    Pulsiam
    Encino CA United States
    ------------------------------



  • 5.  RE: VT100 Function keys / !GET.KEY

    Posted 04-13-2022 10:24
    Henry,

    Is there a DICT or map of the control codes in the SYS.TERMINALS #.IKBIND? What line in the SYS.TERMINAL record represents what function code?

    Jon​

    ------------------------------
    Jon Kristofferson
    Pick Programmer
    Snap-on Credit LLC
    Libertyville IL US
    ------------------------------