summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/keys.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/keys.h')
-rw-r--r--src/include/ipxe/keys.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/ipxe/keys.h b/src/include/ipxe/keys.h
index 783de6cb4..d15267a1f 100644
--- a/src/include/ipxe/keys.h
+++ b/src/include/ipxe/keys.h
@@ -58,6 +58,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*/
#define KEY_ANSI( n, terminator ) ( 0x100 * ( (n) + 1 ) + (terminator) )
+#define KEY_ANSI_N( key ) ( ( (key) / 0x100 ) - 1 )
+#define KEY_ANSI_TERMINATOR( key ) ( (key) & 0xff )
#define KEY_MIN 0x101
#define KEY_UP KEY_ANSI ( 0, 'A' ) /**< Up arrow */