summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers/keyboard.c')
-rw-r--r--payloads/libpayload/drivers/keyboard.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/keyboard.c b/payloads/libpayload/drivers/keyboard.c
index 95827463ca..0d8f72b32e 100644
--- a/payloads/libpayload/drivers/keyboard.c
+++ b/payloads/libpayload/drivers/keyboard.c
@@ -326,6 +326,11 @@ int keyboard_add_reset_handler(void (*new_handler)(void))
return 0;
}
+static struct console_input_driver cons = {
+ .havekey = keyboard_havechar,
+ .getchar = keyboard_getchar
+};
+
void keyboard_init(void)
{
u8 mode;
@@ -350,5 +355,7 @@ void keyboard_init(void)
/* Write the new mode */
keyboard_set_mode(mode);
+
+ console_add_input_driver(&cons);
}