]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/boot/efi/console.h
Merge pull request #2569 from zonque/removals
[thirdparty/systemd.git] / src / boot / efi / console.h
1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published by
4 * the Free Software Foundation; either version 2.1 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
11 *
12 * Copyright (C) 2012-2013 Kay Sievers <kay@vrfy.org>
13 * Copyright (C) 2012 Harald Hoyer <harald@redhat.com>
14 */
15
16 #ifndef __SDBOOT_CONSOLE_H
17 #define __SDBOOT_CONSOLE_H
18
19 #define EFI_SHIFT_STATE_VALID 0x80000000
20 #define EFI_RIGHT_CONTROL_PRESSED 0x00000004
21 #define EFI_LEFT_CONTROL_PRESSED 0x00000008
22 #define EFI_RIGHT_ALT_PRESSED 0x00000010
23 #define EFI_LEFT_ALT_PRESSED 0x00000020
24
25 #define EFI_CONTROL_PRESSED (EFI_RIGHT_CONTROL_PRESSED|EFI_LEFT_CONTROL_PRESSED)
26 #define EFI_ALT_PRESSED (EFI_RIGHT_ALT_PRESSED|EFI_LEFT_ALT_PRESSED)
27 #define KEYPRESS(keys, scan, uni) ((((UINT64)keys) << 32) | ((scan) << 16) | (uni))
28 #define KEYCHAR(k) ((k) & 0xffff)
29 #define CHAR_CTRL(c) ((c) - 'a' + 1)
30
31 EFI_STATUS console_key_read(UINT64 *key, BOOLEAN wait);
32 #endif