mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
OvmfPkg/VirtioInputDxe: handle Ctrl-Alt-Del
Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name> Tested-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
This commit is contained in:
parent
1bc9b85452
commit
d98a39d4ce
2 changed files with 12 additions and 0 deletions
|
|
@ -32,6 +32,7 @@
|
|||
DebugLib
|
||||
MemoryAllocationLib
|
||||
UefiBootServicesTableLib
|
||||
UefiRuntimeServicesTableLib
|
||||
UefiDriverEntryPoint
|
||||
UefiLib
|
||||
VirtioLib
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <Library/DebugLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
|
||||
#include "VirtioInput.h"
|
||||
|
|
@ -441,6 +442,16 @@ VirtioKeyboardHandleEvent (
|
|||
// Key pressed event received
|
||||
Dev->KeyActive[(UINT8)Event->Code] = TRUE;
|
||||
|
||||
// Handle Ctrl-Alt-Del (in any order)
|
||||
if (
|
||||
(Dev->KeyActive[KEY_LEFTCTRL] || Dev->KeyActive[KEY_RIGHTCTRL]) &&
|
||||
(Dev->KeyActive[KEY_LEFTALT] || Dev->KeyActive[KEY_RIGHTALT]) &&
|
||||
Dev->KeyActive[KEY_DELETE]
|
||||
)
|
||||
{
|
||||
gRT->ResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
}
|
||||
|
||||
//
|
||||
// Update toggle state
|
||||
// This must happen before EFI_KEY_DATA is populated, since the toggle state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue