summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nanolight.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nanolight.c b/src/nanolight.c
index 2ed51ce..adebcc4 100644
--- a/src/nanolight.c
+++ b/src/nanolight.c
@@ -238,10 +238,6 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, struct nanoligh
gboolean r;
int claim = 0;
- /* Throw the event to the IM context and let it sort things out */
- r = gtk_im_context_filter_keypress(GTK_IM_CONTEXT(nl->im_context), event);
- if ( r ) return FALSE; /* IM ate it */
-
switch ( event->keyval ) {
case GDK_KEY_Left :
@@ -270,6 +266,22 @@ static gboolean key_press_sig(GtkWidget *da, GdkEventKey *event, struct nanoligh
redraw(nl);
break;
+ case GDK_KEY_KP_Enter :
+ printf("Go!\n");
+ claim = 1;
+ break;
+
+ case GDK_KEY_KP_Add :
+ printf("Stop/back!\n");
+ claim = 1;
+ break;
+
+ }
+
+ if ( !claim ) {
+ /* Throw the event to the IM context and let it sort things out */
+ r = gtk_im_context_filter_keypress(GTK_IM_CONTEXT(nl->im_context), event);
+ if ( r ) claim = 1;
}
if ( claim ) return TRUE;