Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 49583d582bef61c1c3c31d7eb45455a35304e7c9
      
https://github.com/tianocore/edk2/commit/49583d582bef61c1c3c31d7eb45455a35304e7c9
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c
    M OvmfPkg/VirtioInputDxe/VirtioMouse.c
    M OvmfPkg/VirtioInputDxe/VirtioTablet.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: include missing headers in VirtioInput.h

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: aba8628e175d110740187f06d7f2bde33253dfc6
      
https://github.com/tianocore/edk2/commit/aba8628e175d110740187f06d7f2bde33253dfc6
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: invert condition for matching KEY_PRESSED events

Technically, beyond KEY_PRESSED and its inverse KEY_RELEASED, a third
type of event is possible for autorepeated keystrokes.  Invert the
condition on Event->Value to handle autorepeat events as (successive)
key presses rather than repeated releases (essentially ignoring them).

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 89152c91affa5994db84c79e730c9e7880426704
      
https://github.com/tianocore/edk2/commit/89152c91affa5994db84c79e730c9e7880426704
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: do not set ScanCode together with UnicodeChar

EFI_INPUT_KEY's ->ScanCode and ->UnicodeChar are mutually exclusive.
The value space of ->ScanCode only includes representations of keys that
are not representable in Unicode (F1-F10, Esc, arrows etc.) and vice
versa. Furthermore, the integer representations of those fields overlap.
As such, writing ->UnicodeChar values into ->ScanCode is invalid and
produces bogus EFI_INPUT_KEYs that would compare inequal to any
well-formed values that might be passed into e.g. RegisterKeyNotifyEx.

Do not set ->ScanCode when a Unicode value is produced for a printable
character.

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: eaa78fc2f04ae2a10949bbd8a18abb378a9ab5fa
      
https://github.com/tianocore/edk2/commit/eaa78fc2f04ae2a10949bbd8a18abb378a9ab5fa
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: maintain key modifier state

- on each event, compute and save full key state at the time of event
  rather than just the input key itself
- correctly handle unrepresentable events (events which result in a
  null EFI scancode / Unicode value) and do not enqueue them as keys
  unless EFI_KEY_STATE_EXPOSED
- on ReadKeyStrokeEx, return the saved full key state rather than
  recompute modifier state based on potentially-changed data
- on SetStateEx, update EFI_KEY_STATE_EXPOSED
  (toggle state is not implemented yet)

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 1c05d447151dd6c7bfa615f0b99e1e3e93842a7e
      
https://github.com/tianocore/edk2/commit/1c05d447151dd6c7bfa615f0b99e1e3e93842a7e
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: add a EFI key queue for pending input

With support for partial keystrokes, the one-element "last key" buffer
is now actively lossy, as a single compound key press (such as Shift-S)
will produce two EFI_KEY_DATAs which will likely be processed in the
same GetDeviceData() loop, but only one of them would be retained.

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 434239eeab65e07e69ee892a106cfea4f123953b
      
https://github.com/tianocore/edk2/commit/434239eeab65e07e69ee892a106cfea4f123953b
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: omit partial keystrokes

WaitForKey and ReadKeyStroke of SIMPLE_TEXT_INPUT must omit partial
keystrokes, as they do not return modifier and shift state (thus a
partial keystroke would read as an empty struct). Skip over partial
keystrokes in the key queue, should there be any.

Note that WaitForKeyEx of SIMPLE_TEXT_INPUT_EX must also omit partials,
thus it continues to share the implementation with WaitForKey -- unlike
ReadKeyStrokeEx and ReadKeyStroke.

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 30d146175fb14d8d4650aed8981ce04ad83dcdca
      
https://github.com/tianocore/edk2/commit/30d146175fb14d8d4650aed8981ce04ad83dcdca
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: ReadKeyStrokeEx must always expose KeyState

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 1c76821458738ede0ee19c657ef5e10a1331e9e7
      
https://github.com/tianocore/edk2/commit/1c76821458738ede0ee19c657ef5e10a1331e9e7
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: fold Shift correctly

After applying Shift to a printable character, we must clear
`EFI_*_SHIFT_PRESSED` from ->KeyState to follow SIMPLE_TEXT_INPUT(_EX).

This means that ->KeyState must be populated before key code is parsed.

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 93be2ced1c60dadb00bf548786a025302d85757c
      
https://github.com/tianocore/edk2/commit/93be2ced1c60dadb00bf548786a025302d85757c
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: fold Ctrl correctly

Folding Ctrl into a printable character to produce a C0 control code is
not specified by SIMPLE_TEXT_INPUT(_EX). We apply it for narrow
compatibility with other keyboard drivers and TerminalDxe; as such,
only apply it ReadKeyStroke (which is the only interface that does not
convey modifier state explicitly).

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: c1ece6ba0a7e2fd00ea65126095292e43b386361
      
https://github.com/tianocore/edk2/commit/c1ece6ba0a7e2fd00ea65126095292e43b386361
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: maintain keyboard toggle state

In addition to maintaining full key state, we also need to maintain
explicit toggle (NumLock/CapsLock/ScrollLock) state. This completes
->KeyState->KeyToggleState handling and SetStateEx() implementation.

When a *Lock key is pressed, update the keyboard toggle state before
doing anything else. This must happen first, as this state is copied
into ->KeyState (and ->KeyState needs to be filled before ->Key, as
Shift state must be cleared after shifting a printable character).

When filling ->Key, apply CapsLock in series with Shift key handling
(CapsLock only applies to alphabetic characters, but otherwise it XORs
with Shift).

Finally, complete SetStateEx() implementation as we can now apply all
KeyToggleState bits properly.

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: 1bc9b85452b3a21bbd606b651949ce6fe83931db
      
https://github.com/tianocore/edk2/commit/1bc9b85452b3a21bbd606b651949ce6fe83931db
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.h
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: implement key notifications

Presently, VirtioInputDxe accepts key notifications (RegisterKeyNotifyEx)
but does not act upon them. Despite ConSplitter correctly registering
notifications via all input devices (including PS/2 etc. devices
that implement key notifications correctly), emulators such as QEMU
stop sending input to non-virtio keyboards as soon as the virtio device
is claimed. As a result, preboot hotkeys are non-functional when virtio
is used.

Fixes: https://github.com/tianocore/edk2/issues/12887

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


  Commit: d98a39d4ceeb7204b33fc330fdfee8cdb5ddbb43
      
https://github.com/tianocore/edk2/commit/d98a39d4ceeb7204b33fc330fdfee8cdb5ddbb43
  Author: Ivan Shapovalov <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    M OvmfPkg/VirtioInputDxe/VirtioInput.inf
    M OvmfPkg/VirtioInputDxe/VirtioKeyboard.c

  Log Message:
  -----------
  OvmfPkg/VirtioInputDxe: handle Ctrl-Alt-Del

Signed-off-by: Ivan Shapovalov <[email protected]>
Tested-by: Alexander Mikhalitsyn <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/2970e5699ba6...d98a39d4ceeb

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

Reply via email to