qulogic/libgnt

ca85ba91a83c
Merged in fix-arrow-keys (pull request #8)

Fix arrow keys

Approved-by: Gary Kramlich
  • +1 -8
    gntkeys.c
  • +1 -0
    gntmain.c
  • --- a/gntkeys.c Fri Jan 18 02:41:28 2019 +0000
    +++ b/gntkeys.c Fri Mar 08 02:55:49 2019 +0000
    @@ -166,14 +166,7 @@
    {
    while (*text == 27 && *(text + 1) == 27)
    text++;
    - if (*text == 27 && *(text + 1) == '[' &&
    - (*(text + 2) >= 'A' && *(text + 2) <= 'D')) {
    - /* Apparently this is necessary for urxvt and screen and xterm */
    - if (strstr(term, "screen") == term || strcmp(term, "rxvt-unicode") == 0 ||
    - strstr(term, "xterm") == term ||
    - strstr(term, "vt100") == term)
    - *(text + 1) = 'O';
    - } else if (g_utf8_get_char(text) == 195) {
    + if (g_utf8_get_char(text) == 195) {
    if (*(text + 2) == 0 && strstr(term, "xterm") == term) {
    *(text) = 27;
    *(text + 1) -= 64; /* Say wha? */
    --- a/gntmain.c Fri Jan 18 02:41:28 2019 +0000
    +++ b/gntmain.c Fri Mar 08 02:55:49 2019 +0000
    @@ -607,6 +607,7 @@
    typeahead(-1);
    noecho();
    curs_set(0);
    + keypad(stdscr, 1);
    gnt_init_keys();
    gnt_init_styles();