summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e29f383)
raw | patch | inline | side by side (parent: e29f383)
author | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 11:18:48 +0000 (12:18 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Mon, 20 Mar 2017 11:18:48 +0000 (12:18 +0100) |
src/keyboard.c | patch | blob | history |
diff --git a/src/keyboard.c b/src/keyboard.c
index c5d8c7814199781863188c7e892acfe3bca77ae6..da0b5a20e6fd2dcfc6f95666925746591593b277 100644 (file)
--- a/src/keyboard.c
+++ b/src/keyboard.c
#include <unistd.h>
+gcc_pure
static command_t
-get_keyboard_command(void)
+translate_key(int key)
{
- int key = wgetch(stdscr);
if (key == ERR || key == '\0')
return CMD_NONE;
return get_key_command(key);
}
+static command_t
+get_keyboard_command(void)
+{
+ return translate_key(wgetch(stdscr));
+}
+
static gboolean
keyboard_event(gcc_unused GIOChannel *source,
gcc_unused GIOCondition condition,