make keypad enter do the same thing as return

This commit is contained in:
Dana Jansens 2010-03-25 22:17:05 -04:00
parent 11bb31d3bc
commit e7d5ef8418
6 changed files with 6 additions and 6 deletions

View file

@ -195,7 +195,7 @@ static gboolean i_input_func(guint initial_state,
}
/* There were no modifiers and they pressed enter */
else if (sym == XK_Return && !initial_state) {
else if ((sym == XK_Return || sym == XK_KP_Enter) && !initial_state) {
o->cancel = FALSE;
o->state = e->xkey.state;
return FALSE;

View file

@ -327,7 +327,7 @@ static gboolean i_input_func(guint initial_state,
return FALSE;
/* There were no modifiers and they pressed enter */
else if (sym == XK_Return && !initial_state)
else if ((sym == XK_Return || sym == XK_KP_Enter) && !initial_state)
return FALSE;
}
/* They released the modifiers */

View file

@ -278,7 +278,7 @@ static gboolean i_input_func(guint initial_state,
}
/* There were no modifiers and they pressed enter */
else if (sym == XK_Return && !initial_state) {
else if ((sym == XK_Return || sym == XK_KP_Enter) && !initial_state) {
end_cycle(FALSE, e->xkey.state, options);
return FALSE;
}

View file

@ -1882,7 +1882,7 @@ static gboolean event_handle_menu_input(XEvent *ev)
ret = TRUE;
}
else if (sym == XK_Return) {
else if (sym == XK_Return || sym == XK_KP_Enter) {
frame->press_doexec = TRUE;
ret = TRUE;
}

View file

@ -916,7 +916,7 @@ gboolean moveresize_event(XEvent *e)
if (sym == XK_Escape) {
moveresize_end(TRUE);
used = TRUE;
} else if (sym == XK_Return) {
} else if (sym == XK_Return || sym == XK_KP_Enter) {
moveresize_end(FALSE);
used = TRUE;
} else if (sym == XK_Right || sym == XK_Left ||

View file

@ -540,7 +540,7 @@ gboolean prompt_key_event(ObPrompt *self, XEvent *e)
if (sym == XK_Escape)
prompt_cancel(self);
else if (sym == XK_Return || sym == XK_space)
else if (sym == XK_Return || sym == XK_KP_Enter || sym == XK_space)
prompt_run_callback(self, self->focus->result);
else if (sym == XK_Tab || sym == XK_Left || sym == XK_Right) {
gint i;