Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 184fb6b1035ee080ea6a5472f54b16dcdd3de0eb
https://github.com/tianocore/edk2/commit/184fb6b1035ee080ea6a5472f54b16dcdd3de0eb
Author: Evgenii Shatokhin <[email protected]>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
Log Message:
-----------
MdeModulePkg/TerminalDxe: Fix handling of shift state in notifications
Fixes: #12281
Currently, TerminalConInRegisterKeyNotify() allows registering a
notification with nonzero KeyShiftState or KeyToggleState. However,
IsKeyRegistered() ignores these when checking if the keys match.
As a result, some firmware component may successfully register a
notification for, say, RCtrl+n, but the notification function will be
called each time the user presses 'n', which is wrong.
Shift state and toggle state are not transferred via a serial line, so
the notification functions for the keys with nonzero KeyShiftState or
KeyToggleState will never trigger in this case.
TerminalConInRegisterKeyNotify() could reject such notifications but it is
unclear if it could break the existing UEFI components.
Instead, this patch adds a debug message when someone tries to register a
notification with nonzero states, it also updates IsKeyRegistered() to take
KeyShiftState and KeyToggleState into account.
This way, IsKeyRegistered() will treat the notifications for 'n' and
'RCtrl+n' as different ones. So, the callback function for 'RCtrl+n' will
not be called when the user presses 'n'.
As it is not prohibited to set only EFI_SHIFT_STATE_VALID flag in the shift
state (leaving the remaining bits zeroed), IsKeyRegistered() ignores
EFI_SHIFT_STATE_VALID.
Signed-off-by: Evgenii Shatokhin <[email protected]>
Commit: 44c61c88e6e2bfb37d026308a0ffe31260642552
https://github.com/tianocore/edk2/commit/44c61c88e6e2bfb37d026308a0ffe31260642552
Author: Evgenii Shatokhin <[email protected]>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h
M MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c
Log Message:
-----------
MdeModulePkg/TerminalDxe: Fix a typo
s/Regsitered/Registered/
Signed-off-by: Evgenii Shatokhin <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/195707b199a0...44c61c88e6e2
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits