Skip to content

Caps Lock remains held in guest after key is released #7838

Description

@lprazdnik

Describe the issue

When Caps Lock is treated as a key is enabled, Caps Lock can be used as a held modifier in a guest, but releasing the physical Caps Lock key does not appear to release it in the guest.

This is reliably reproducible with NVDA in a Windows 11 ARM QEMU guest when Caps Lock is configured as the NVDA modifier. After using a Caps Lock-based NVDA command and releasing the key, the next key is still interpreted as though Caps Lock is held. Pressing Caps Lock once more clears the state.

This is particularly noticeable with screen readers because they use Caps Lock as a held modifier rather than only as a toggle. I have not confirmed whether other software that depends on Caps Lock key-down/key-up events is affected.

Related to #4330, which was closed after the Caps Lock is treated as a key preference was available as a workaround for screen-reader use.

Steps to reproduce

  1. In UTM settings, enable Caps Lock is treated as a key.
  2. Start a Windows 11 ARM QEMU guest.
  3. In NVDA, configure Caps Lock as the NVDA modifier.
  4. Hold Caps Lock and press an NVDA command, for example Caps Lock+N, then release both keys.
  5. Press a normal key such as T.

Expected behavior

After Caps Lock is physically released, the next key should be handled normally. In the example above, T should be a normal T.

Actual behavior

The next key is still interpreted as though Caps Lock is being held. In the example above, NVDA handles T as NVDA+T. Pressing and releasing Caps Lock again clears the stuck modifier state.

Configuration

  • UTM Version: 4.7.5 (118)
  • macOS Version: 26.6.2
  • Mac Chip: Apple M5 Max
  • Guest: Windows 11 ARM, QEMU

Crash log

Not applicable; UTM does not crash.

Debug log

Not attached. The issue is reliably reproducible as described above; I can provide a debug log if it would help diagnose the input event handling.

Upload VM

Not attached. The issue is reproducible in a standard Windows 11 ARM QEMU guest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions