Index: uspace/lib/clui/tinput.c
===================================================================
--- uspace/lib/clui/tinput.c	(revision 902f090647aa06eb336a0b14c1f5361be47bb430)
+++ uspace/lib/clui/tinput.c	(revision 3f06dae84ce91fe16bc8e73eb9b8545daf76d452)
@@ -45,4 +45,5 @@
 #define LIN_TO_COL(ti, lpos) ((lpos) % ((ti)->con_cols))
 #define LIN_TO_ROW(ti, lpos) ((lpos) / ((ti)->con_cols))
+#define LIN_POS(ti, col, row) ((col) + (row) * (ti)->con_cols)
 
 /** Seek direction */
@@ -383,4 +384,21 @@
 }
 
+static void tinput_seek_scrpos(tinput_t *ti, int col, int line, bool shift_held)
+{
+	unsigned lpos;
+	tinput_pre_seek(ti, shift_held);
+
+	lpos = LIN_POS(ti, col, line);
+
+	if (lpos > ti->text_coord)
+		ti->pos = lpos -  ti->text_coord;
+	else
+		ti->pos = 0;
+	if (ti->pos > ti->nc)
+		ti->pos = ti->nc;
+
+	tinput_post_seek(ti, shift_held);
+}
+
 static void tinput_seek_max(tinput_t *ti, seek_dir_t dir, bool shift_held)
 {
@@ -787,4 +805,37 @@
 }
 
+/** Handle key press event. */
+static void tinput_key_press(tinput_t *ti, kbd_event_t *kev)
+{
+	if (((kev->mods & KM_CTRL) != 0) &&
+	    ((kev->mods & (KM_ALT | KM_SHIFT)) == 0))
+		tinput_key_ctrl(ti, kev);
+	
+	if (((kev->mods & KM_SHIFT) != 0) &&
+	    ((kev->mods & (KM_CTRL | KM_ALT)) == 0))
+		tinput_key_shift(ti, kev);
+	
+	if (((kev->mods & KM_CTRL) != 0) &&
+	    ((kev->mods & KM_SHIFT) != 0) &&
+	    ((kev->mods & KM_ALT) == 0))
+		tinput_key_ctrl_shift(ti, kev);
+	
+	if ((kev->mods & (KM_CTRL | KM_ALT | KM_SHIFT)) == 0)
+		tinput_key_unmod(ti, kev);
+	
+	if (kev->c >= ' ') {
+		tinput_sel_delete(ti);
+		tinput_insert_char(ti, kev->c);
+	}
+}
+
+/** Position event */
+static void tinput_pos(tinput_t *ti, pos_event_t *ev)
+{
+	if (ev->type == POS_PRESS) {
+		tinput_seek_scrpos(ti, ev->hpos, ev->vpos, false);
+	}
+}
+
 /** Read in one line of input.
  *
@@ -820,28 +871,12 @@
 			return EIO;
 		
-		if (ev.type != CEV_KEY || ev.ev.key.type != KEY_PRESS)
-			continue;
-		
-		kbd_event_t *kev = &ev.ev.key;
-		
-		if (((kev->mods & KM_CTRL) != 0) &&
-		    ((kev->mods & (KM_ALT | KM_SHIFT)) == 0))
-			tinput_key_ctrl(ti, kev);
-		
-		if (((kev->mods & KM_SHIFT) != 0) &&
-		    ((kev->mods & (KM_CTRL | KM_ALT)) == 0))
-			tinput_key_shift(ti, kev);
-		
-		if (((kev->mods & KM_CTRL) != 0) &&
-		    ((kev->mods & KM_SHIFT) != 0) &&
-		    ((kev->mods & KM_ALT) == 0))
-			tinput_key_ctrl_shift(ti, kev);
-		
-		if ((kev->mods & (KM_CTRL | KM_ALT | KM_SHIFT)) == 0)
-			tinput_key_unmod(ti, kev);
-		
-		if (kev->c >= ' ') {
-			tinput_sel_delete(ti);
-			tinput_insert_char(ti, kev->c);
+		switch (ev.type) {
+		case CEV_KEY:
+			if (ev.ev.key.type == KEY_PRESS)
+				tinput_key_press(ti, &ev.ev.key);
+			break;
+		case CEV_POS:
+			tinput_pos(ti, &ev.ev.pos);
+			break;
 		}
 	}
Index: uspace/lib/gui/terminal.c
===================================================================
--- uspace/lib/gui/terminal.c	(revision 902f090647aa06eb336a0b14c1f5361be47bb430)
+++ uspace/lib/gui/terminal.c	(revision 3f06dae84ce91fe16bc8e73eb9b8545daf76d452)
@@ -420,10 +420,11 @@
 		if (pos < size) {
 			link_t *link = prodcons_consume(&term->input_pc);
-			kbd_event_t *event = list_get_instance(link, kbd_event_t, link);
+			cons_event_t *event = list_get_instance(link, cons_event_t, link);
 			
 			/* Accept key presses of printable chars only. */
-			if ((event->type == KEY_PRESS) && (event->c != 0)) {
+			if (event->type == CEV_KEY && event->ev.key.type == KEY_PRESS &&
+			    event->ev.key.c != 0) {
 				wchar_t tmp[2] = {
-					event->c,
+					event->ev.key.c,
 					0
 				};
@@ -583,9 +584,8 @@
 	terminal_t *term = srv_to_terminal(srv);
 	link_t *link = prodcons_consume(&term->input_pc);
-	kbd_event_t *kevent = list_get_instance(link, kbd_event_t, link);
-	
-	event->type = CEV_KEY;
-	event->ev.key = *kevent;
-	free(kevent);
+	cons_event_t *ev = list_get_instance(link, cons_event_t, link);
+	
+	*event = *ev;
+	free(ev);
 	return EOK;
 }
@@ -635,30 +635,48 @@
 }
 
+static void terminal_queue_cons_event(terminal_t *term, cons_event_t *ev)
+{
+	/* Got key press/release event */
+	cons_event_t *event =
+	    (cons_event_t *) malloc(sizeof(cons_event_t));
+	if (event == NULL)
+		return;
+	
+	*event = *ev;
+	link_initialize(&event->link);
+	
+	prodcons_produce(&term->input_pc, &event->link);
+}
+
+/* Got key press/release event */
 static void terminal_handle_keyboard_event(widget_t *widget,
     kbd_event_t kbd_event)
 {
 	terminal_t *term = (terminal_t *) widget;
-	
-	/* Got key press/release event */
-	kbd_event_t *event =
-	    (kbd_event_t *) malloc(sizeof(kbd_event_t));
-	if (event == NULL)
-		return;
-	
-	link_initialize(&event->link);
-	event->type = kbd_event.type;
-	event->key = kbd_event.key;
-	event->mods = kbd_event.mods;
-	event->c = kbd_event.c;
-	
-	prodcons_produce(&term->input_pc, &event->link);
-}
-
-static void terminal_handle_position_event(widget_t *widget, pos_event_t event)
-{
-	/*
-	 * Mouse events are ignored so far.
-	 * There is no consumer for it.
-	 */
+	cons_event_t event;
+	
+	event.type = CEV_KEY;
+	event.ev.key = kbd_event;
+	
+	terminal_queue_cons_event(term, &event);
+}
+
+static void terminal_handle_position_event(widget_t *widget, pos_event_t pos_event)
+{
+	cons_event_t event;
+	terminal_t *term = (terminal_t *) widget;
+	sysarg_t sx = term->widget.hpos;
+	sysarg_t sy = term->widget.vpos;
+
+	if (pos_event.type == POS_PRESS) {
+		event.type = CEV_POS;
+		event.ev.pos.type = pos_event.type;
+		event.ev.pos.pos_id = pos_event.pos_id;
+		event.ev.pos.btn_num = pos_event.btn_num;
+
+		event.ev.pos.hpos = (pos_event.hpos - sx) / FONT_WIDTH;
+		event.ev.pos.vpos = (pos_event.vpos - sy) / FONT_SCANLINES;
+		terminal_queue_cons_event(term, &event);
+	}
 }
 
