keyboard: Handle touch up event

This fixes arrow keys which trigger on button up.

Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73169
diff --git a/clients/keyboard.c b/clients/keyboard.c
index 9ee4a84..e08a5fa 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -625,11 +625,9 @@
 }
 
 static void
-touch_down_handler(struct widget *widget, struct input *input,
-		   uint32_t serial, uint32_t time, int32_t id,
-		   float x, float y, void *data)
+touch_handler(struct input *input, uint32_t time,
+	      float x, float y, uint32_t state, void *data)
 {
-
 	struct keyboard *keyboard = data;
 	struct rectangle allocation;
 	int row, col;
@@ -648,20 +646,35 @@
 	for (i = 0; i < layout->count; ++i) {
 		col -= layout->keys[i].width;
 		if (col < 0) {
-			keyboard_handle_key(keyboard, time, &layout->keys[i], input, WL_POINTER_BUTTON_STATE_PRESSED);
+			keyboard_handle_key(keyboard, time,
+					    &layout->keys[i], input, state);
 			break;
 		}
 	}
 
-	widget_schedule_redraw(widget);
+	widget_schedule_redraw(keyboard->widget);
+}
+
+static void
+touch_down_handler(struct widget *widget, struct input *input,
+		   uint32_t serial, uint32_t time, int32_t id,
+		   float x, float y, void *data)
+{
+  touch_handler(input, time, x, y, 
+		WL_POINTER_BUTTON_STATE_PRESSED, data);
 }
 
 static void
 touch_up_handler(struct widget *widget, struct input *input,
-				uint32_t serial, uint32_t time, int32_t id,
-				void *data)
+		 uint32_t serial, uint32_t time, int32_t id,
+		 void *data)
 {
+  float x, y;
 
+  input_get_touch(input, id, &x, &y);
+
+  touch_handler(input, time, x, y,
+		WL_POINTER_BUTTON_STATE_RELEASED, data);
 }
 
 static void
@@ -882,7 +895,6 @@
 	widget_set_touch_down_handler(keyboard->widget, touch_down_handler);
 	widget_set_touch_up_handler(keyboard->widget, touch_up_handler);
 
-
 	window_schedule_resize(keyboard->window,
 			       layout->columns * key_width,
 			       layout->rows * key_height);