summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index f10ce43..b5c1949 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -269,13 +269,19 @@ void feh_event_invoke_action(winwidget winwid, unsigned char action)
void feh_event_handle_stdin()
{
char stdin_buf[2];
+ KeySym keysym = NoSymbol;
if (read(STDIN_FILENO, &stdin_buf, 1) == -1) {
weprintf("reading a command from stdin failed");
return;
}
stdin_buf[1] = '\0';
- KeySym keysym = XStringToKeysym(stdin_buf);
+ if (stdin_buf[0] == ' ')
+ keysym = XK_space;
+ else if (stdin_buf[0] == '\n')
+ keysym = XK_Return;
+ else
+ keysym = XStringToKeysym(stdin_buf);
if (window_num)
feh_event_handle_generic(windows[0], 0, keysym, 0);