From: Max Kellermann Date: Mon, 20 Mar 2017 11:19:29 +0000 (+0100) Subject: keyboard: implement keyboard_unread() without ungetch() X-Git-Tag: v0.26~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=42947fa12f82681e2b7062ab3b9c5aacc1b203cf;p=ncmpc.git keyboard: implement keyboard_unread() without ungetch() --- diff --git a/src/keyboard.c b/src/keyboard.c index da0b5a2..d990e36 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -75,9 +75,7 @@ keyboard_init(void) void keyboard_unread(int key) { - ungetch(key); - - command_t cmd = get_keyboard_command(); + command_t cmd = translate_key(key); if (cmd != CMD_NONE) do_input_event(cmd); }