summaryrefslogtreecommitdiff
path: root/src/grp-boot/systemd-boot/console.h
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-06 22:48:01 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-06 22:48:01 -0400
commit3becb99f442630e1f0771a86320dd668e3da03c3 (patch)
tree5c18d6eaa7a80a4ab1eb36b3b774a5c65d0c2590 /src/grp-boot/systemd-boot/console.h
parent4511e28baca960f9a732e600af6acbb242b22b91 (diff)
stuff
Diffstat (limited to 'src/grp-boot/systemd-boot/console.h')
-rw-r--r--src/grp-boot/systemd-boot/console.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/grp-boot/systemd-boot/console.h b/src/grp-boot/systemd-boot/console.h
new file mode 100644
index 0000000000..3fe0ce5ec4
--- /dev/null
+++ b/src/grp-boot/systemd-boot/console.h
@@ -0,0 +1,32 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (C) 2012-2013 Kay Sievers <kay@vrfy.org>
+ * Copyright (C) 2012 Harald Hoyer <harald@redhat.com>
+ */
+
+#ifndef __SDBOOT_CONSOLE_H
+#define __SDBOOT_CONSOLE_H
+
+#define EFI_SHIFT_STATE_VALID 0x80000000
+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
+#define EFI_LEFT_CONTROL_PRESSED 0x00000008
+#define EFI_RIGHT_ALT_PRESSED 0x00000010
+#define EFI_LEFT_ALT_PRESSED 0x00000020
+
+#define EFI_CONTROL_PRESSED (EFI_RIGHT_CONTROL_PRESSED|EFI_LEFT_CONTROL_PRESSED)
+#define EFI_ALT_PRESSED (EFI_RIGHT_ALT_PRESSED|EFI_LEFT_ALT_PRESSED)
+#define KEYPRESS(keys, scan, uni) ((((UINT64)keys) << 32) | ((scan) << 16) | (uni))
+#define KEYCHAR(k) ((k) & 0xffff)
+#define CHAR_CTRL(c) ((c) - 'a' + 1)
+
+EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait);
+#endif