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