X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=madtty%2Fmadtty.c;h=ce9f256c9c0cc14171514467f14a2421cfe29a5d;hb=7a634f01490ab34dcddffdde5b5a3d5dd10f6de5;hp=44533452a6571bfdd06ac3ddfa24cad635cf7ace;hpb=f5196e6e851c7d1dcf8c7e9c50f4da314c6ac238;p=apps%2Fmadtty.git diff --git a/madtty/madtty.c b/madtty/madtty.c index 4453345..ce9f256 100644 --- a/madtty/madtty.c +++ b/madtty/madtty.c @@ -846,16 +846,20 @@ void madtty_keypress(madtty_t *rt, int keycode) const char *buf; int len; +#if 0 + if (keycode == KEY_F(1)) { +#define MIN(a, b) ((a < (b)) ? a : (b)) + kill(-rt->childpid, SIGWINCH); + rt->scroll_bot = MIN(rt->scroll_bot, rt->lines + rt->rows); + rt->curs_row = MIN(rt->curs_row, rt->lines + rt->rows); + printf(stderr, "%d\n", rt->rows); + return; + } +#endif if (keycode >= 0 && keycode < KEY_MAX && keytable[keycode]) { buf = keytable[keycode]; len = strlen(keytable[keycode]); } else { -#if 0 - if (keycode == KEY_F(3)) { - kill(-rt->childpid, SIGWINCH); - return; - } -#endif buf = &c; len = 1; }