• Functional Keys in Mystic DOOR

    From shinobi@21:1/153 to All on Thursday, February 15, 2018 19:12:25

    Hello All,

    these are the Codes that would the door program receive
    in SyncTERM when Funcional keys are pressed:

    ESC OP - F1
    ESC OQ - F2
    ESC OR - F3
    ESC OS - F4
    ESC Ot - F5
    ESC [17~ - F6
    ESC [18~ - F7
    ESC [19~ - F8
    ESC [20~ - F9
    ESC [21~ - F10
    ESC [23~ - F11
    ESC [24~ - F12
    ESC [H - Home
    ESC [K - End
    ESC [U - PD
    ESC [V - PU
    ESC [D - Left
    ESC [C - Right
    ESC [A - Up
    ESC [B - Down

    Hope that's useful to anyone.

    Best regards

    Shinobi

    P.S. this is the C program to obtain such a keys

    //
    // BASIC HELPER FOR REWRITE TO 2.7.15
    //
    #include <stdio.h>
    #include <termios.h>
    #include <stddef.h>

    static struct termios old, new;

    /* Initialize new terminal i/o settings */
    void initTermios(int echo)
    {
    tcgetattr(0, &old); /* grab old terminal i/o settings */
    new = old; /* make new settings same as old settings */
    new.c_lflag &= ~ICANON; /* disable buffered i/o */
    new.c_lflag &= echo ? ECHO : ~ECHO; /* set echo mode */
    tcsetattr(0, TCSANOW, &new); /* use these new terminal i/o settings
    now */
    }

    /* Restore old terminal i/o settings */
    void resetTermios(void)
    {
    tcsetattr(0, TCSANOW, &old);
    }

    /* Read 1 character - echo defines echo mode */
    char getch_(int echo)
    {
    char ch;
    initTermios(echo);
    ch = getchar();
    resetTermios();
    return ch;
    }

    int main(void) {
    int c;
    puts("Press keys. Ctrl-C to quit.");

    while(c!='q') {
    c=getch_(0);

    if (c==27)
    printf("\nESC ");
    else if (c>=32 &&c<127)
    printf("%c",c);
    else if (c==10)
    printf("<10>\n");
    else
    printf("<%d>",c);
    fflush(stdout);
    }
    return (0);

    }

    --- Mystic BBS v1.12 A38 2018/01/01 (Linux/64)
    * Origin: INFOLINKA BBS (21:1/153)
  • From xqtr@21:1/111 to shinobi on Friday, February 16, 2018 17:40:48
    ESC [19~ - F8
    ESC [20~ - F9
    ESC [21~ - F10
    ESC [23~ - F11
    ESC [24~ - F12
    ESC [H - Home
    ESC [K - End
    ESC [U - PD
    ESC [V - PU
    ESC [D - Left
    ESC [C - Right
    these are the Codes that would the door program receive
    in SyncTERM when Funcional keys are pressed:

    This is the ANSI representation of the Keys. Its also used in Python scripts. THank you!

    .----- --- -- -
    | Another Droid BBS
    : Telnet : andr01d.zapto.org:9999 [UTC 11:00 - 20:00]
    . Contact : xqtr.xqtr@gmail.com

    --- Mystic BBS v1.12 A38 2018/01/01 (Raspberry Pi/32)
    * Origin: Another Droid BBS (21:1/111)