summary refs log tree commit diff
path: root/keyboard.c
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2022-01-20 20:26:34 -0500
committerZach DeCook <zachdecook@librem.one>2022-01-20 20:26:34 -0500
commit8a3e71164d730500105ae1de2f9a666fb11c9eae (patch)
treecc6a73018ff540618394f188c5f9e47c43dfc2ce /keyboard.c
parent10398d3f9a18575f328d3784beacbc1e937886b8 (diff)
downloadsuggpicker-8a3e71164d730500105ae1de2f9a666fb11c9eae.tar.gz
rows: limit to 1
Diffstat (limited to 'keyboard.c')
-rw-r--r--keyboard.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/keyboard.c b/keyboard.c
index 2a0c982..9e97d20 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -12,19 +12,6 @@
 	fprintf(stderr, __VA_ARGS__);                                                \
 	exit(1)
 
-uint8_t
-kbd_get_rows(struct layout *l) {
-	uint8_t rows = 0;
-	struct key *k = l->keys;
-	while (k->type != Last) {
-		if (k->type == EndRow) {
-			rows++;
-		}
-		k++;
-	}
-	return rows + 1;
-}
-
 void
 kbd_init(struct kbd *kb, struct layout *layouts) {
 	int i;
@@ -60,7 +47,7 @@ kbd_init(struct kbd *kb, struct layout *layouts) {
 void
 kbd_init_layout(struct layout *l, uint32_t width, uint32_t height) {
 	uint32_t x = 0, y = 0;
-	uint8_t rows = kbd_get_rows(l);
+	uint8_t rows = 1;
 
 	l->keyheight = height / rows;