- else if (e->xkey.keycode == ob_keycode(OB_KEY_RETURN) ||
- e->xkey.keycode == ob_keycode(OB_KEY_SPACE))
- {
- if (self->func) self->func(self, self->focus->result, self->data);
- prompt_hide(self);
- }
- else if (e->xkey.keycode == ob_keycode(OB_KEY_TAB) ||
- e->xkey.keycode == ob_keycode(OB_KEY_LEFT) ||
- e->xkey.keycode == ob_keycode(OB_KEY_RIGHT))
- {
+ 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) {