Index: uspace/app/gfxdemo/gfxdemo.c
===================================================================
--- uspace/app/gfxdemo/gfxdemo.c	(revision f9ae472c64c5097b9b929d682dfdf69b3e00addc)
+++ uspace/app/gfxdemo/gfxdemo.c	(revision 082feff5822b8799873a7615938d04e4c58ef101)
@@ -68,4 +68,6 @@
 };
 
+static void demo_kbd_event(kbd_event_t *);
+
 static bool quit = false;
 static FIBRIL_MUTEX_INITIALIZE(quit_lock);
@@ -74,4 +76,5 @@
 static gfx_font_t *font;
 static gfx_coord_t vpad;
+static console_ctrl_t *con = NULL;
 
 /** Determine if we are running in text mode.
@@ -93,11 +96,27 @@
 static void demo_msleep(unsigned msec)
 {
+	errno_t rc;
+	usec_t usec;
+	cons_event_t cevent;
+
 	fibril_mutex_lock(&quit_lock);
-
 	if (!quit) {
-		(void) fibril_condvar_wait_timeout(&quit_cv, &quit_lock,
-		    (usec_t)msec * 1000);
-	}
-
+		if (con != NULL) {
+			usec = (usec_t)msec * 1000;
+			while (usec > 0 && !quit) {
+				rc = console_get_event_timeout(con, &cevent, &usec);
+				if (rc == EOK) {
+					if (cevent.type == CEV_KEY) {
+						fibril_mutex_unlock(&quit_lock);
+						demo_kbd_event(&cevent.ev.key);
+						fibril_mutex_lock(&quit_lock);
+					}
+				}
+			}
+		} else {
+			(void) fibril_condvar_wait_timeout(&quit_cv, &quit_lock,
+			    (usec_t)msec * 1000);
+		}
+	}
 	fibril_mutex_unlock(&quit_lock);
 }
@@ -1050,5 +1069,4 @@
 static errno_t demo_console(void)
 {
-	console_ctrl_t *con = NULL;
 	console_gc_t *cgc = NULL;
 	gfx_context_t *gc;
