diff --git a/src/command.c b/src/command.c
index 881df278a241f58ac6af0f83485441596fa2af68..151d46535f94a7df086a63d05eac1db2636e7d7a 100644 (file)
--- a/src/command.c
+++ b/src/command.c
#include <ctype.h>
#include <glib.h>
#include <signal.h>
+#include <unistd.h>
#undef DEBUG_KEYS
sigstop();
/* handle SIGINT (Ctrl-C) */
if (c == 3)
- exit(EXIT_SUCCESS);
+ kill(getpid(), SIGTERM);
#endif
return c;
}
command_t
-get_keyboard_command_with_timeout(int ms)
+get_keyboard_command(void)
{
int key;
- if (ms != SCREEN_TIMEOUT)
- timeout(ms);
key = my_wgetch(stdscr);
- if (ms != SCREEN_TIMEOUT)
- timeout(SCREEN_TIMEOUT);
-
if (key == ERR)
return CMD_NONE;
return get_key_command(key);
}
-command_t
-get_keyboard_command(void)
-{
- return get_keyboard_command_with_timeout(SCREEN_TIMEOUT);
-}
-
int
assign_keys(command_t command, int keys[MAX_COMMAND_KEYS])
{