dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit f17d1cfb4e06e0635accf829ecfcd39569a3fb6d
parent d1f4984228dff45fd1d77a8a4bbb6312de6dbb4f
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Mon, 16 May 2011 20:45:25 +0200

madtty: remove madtty_keypress_sequence

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
dvtm.c | 19++-----------------
madtty.c | 16----------------
madtty.h | 1-
3 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -991,25 +991,10 @@ parse_args(int argc, char *argv[]) { void keypress(int code) { Client *c; - unsigned int len = 1; - char buf[8] = { '\e' }; - - if (code == '\e') { - /* pass characters following escape to the underlying app */ - nodelay(stdscr, TRUE); - for (int t; len < sizeof(buf) - 1 && (t = getch()) != ERR; len++) - buf[len] = t; - buf[len] = '\0'; - nodelay(stdscr, FALSE); - } for (c = runinall ? clients : sel; c; c = c->next) { - if (!c->minimized || isarrange(fullscreen)) { - if (code == '\e') - madtty_keypress_sequence(c->term, buf); - else - madtty_keypress(c->term, code); - } + if (!c->minimized || isarrange(fullscreen)) + madtty_keypress(c->term, code); if (!runinall) break; } diff --git a/madtty.c b/madtty.c @@ -1443,22 +1443,6 @@ void madtty_keypress(madtty_t *t, int keycode) term_write(t, &c, 1); } -void madtty_keypress_sequence(madtty_t *t, const char *seq) -{ - int key, len = strlen(seq); - /* check for function keys from putty, this makes the - * keypad work but it's probably not the right way to - * do it. the sequence we look for is \eO + a character - * representing the number. - */ - if (len == 3 && seq[0] == '\e' && seq[1] == 'O') { - key = seq[2] - 64; - if (key >= '0' && key <= '9') - madtty_keypress(t, key); - } else - term_write(t, seq, len); -} - void madtty_mouse(madtty_t *t, int x, int y, mmask_t mask) { char seq[6] = { '\e', '[', 'M' }, state = 0, button = 0; diff --git a/madtty.h b/madtty.h @@ -68,7 +68,6 @@ unsigned madtty_cursor(madtty_t *t); int madtty_process(madtty_t *); void madtty_keypress(madtty_t *, int keycode); -void madtty_keypress_sequence(madtty_t *, const char *seq); void madtty_mouse(madtty_t *t, int x, int y, mmask_t mask); void madtty_dirty(madtty_t *t); void madtty_draw(madtty_t *, WINDOW *win, int startrow, int startcol);