PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Keyboard focus is taken away from Windows lock screen - key-presses do not dismiss Windows lock screen until focus is reassigned with alt-tab or mouse click

Open graememeyer opened this issue 1 year ago • 3 comments

Microsoft PowerToys version

0.75.1

Installation method

Chocolatey

Running as admin

No

Area(s) with issue?

General

Steps to reproduce

I'm experiencing the same or a very similar issue to these users on Reddit - PowerToys appears to have been stealing/breaking keyboard focus.

Issue:

My original symptom was that when I was on the Windows 11 lock screen, the pressing keys on the keyboard didn't dismiss the lock screen (or progress to the enter password/PIN screen), until either the mouse was clicked on the lock screen or alt-tab was pressed. It appeared that the keyboard focus was not on LockApp, so pressing the keyboard didn't dismiss the lock screen. The mouse still worked, and pressing alt-tab to switch focus to the lock screen still worked, but pressing any other key did nothing.

Edit: to clarify, I only observed this when the system was locked using Win+ L after the system had been booted and used for a period. I don't recall observing this on first boot, though I can't be certain.

Diagnosis Steps

I too, like the Reddit users, was seeing the MSCTFIME UI events constantly taking focus, though mine show up with the C:\Windows\System32\SynTPEnh.exe path that seems to be Synaptics touchpad driver. I'm using an external monitor with external keyboard and my laptop's lid is closed, so theoretically a good touchpad driver could/should probably not be doing anything in this situation.

Screenshot: image

Testing the fix

Uninstalling PowerToys worked, but only after a restart as the Redditors said.

Diagnosis notes

I still saw the same MSCTFIME UI events and binary path after uninstalling PowerToys and restarting, but the lock screen started working again, indicating that keyboard focus wasn't being stolen (or was being returned).

The bug has not returned, even after reinstalling PowerToys - same version (latest 0.75.1) - and restarting.

I hadn't used many of the PT features, but I had used the keyboard manager to remap a windows shortcut. That same remap was restored when I reinstalled PowerToys, so may not be directly/solely to blame, since I'm not longer experiencing the bug.

Conclusion

While I cannot conclude that the issue is solely with PowerToys or one of it's sub-applications, the fact that uninstalling it does seem to fix the issue indicates that PowerToys is involved in the interaction that causes the issue.

I will update this issue if it reocurrs on my system, or I am able to identify a reliable method of reproducing it.

Environment Details

I was using:

  • PowerToys 0.75.1
    • Running in user-mode
    • Installed via Chocolatey as 0.73.0
    • Upgraded to latest version 0.75.1 using PowerToys' own built-in updater
  • Windows 11 23H2
    • OS build 22631.2715
    • Windows Feature Experience Pack 1000.22677.1000.0
  • HP EliteBook 840 G8
    • Relevant devices:
      • Synaptics HID Device
      • Synaptics StykFHlD Device
    • Relevant driver:
      • Driver (file) name: SynTPEnh.exe
      • Driver version: 19.6.1.22
      • File path: C:\Windows\System32\SynTPEnh.exe
      • File hash: 97EBD7BEB322B86690AAEAB403F363EAA8EEF597D0CD576169456CA6AABA18DC
  • External monitor via USB C (Dell UE2723QE)
  • External wireless keyboard (Logitech K860, plugged into the Dell monitor's USB hub)
  • External wireless mouse (Posturite Penguin Wireless Mouse, plugged into the Dell monitor's USB hub)

✔️ Expected Behavior

When on the Windows 11 lock screen, pressing a key like spacebar or enter should dismiss the lockscreen, or raise the passive front part of it to reveal the password/PIN input screen.

❌ Actual Behavior

Nothing happens when keys were pressed, until either alt-tab was used or the mouse was clicked to re-assign the focus.

Other Software

Possible interaction with the synaptics driver on my system.

Relevant driver:

  • Driver (file) name: SynTPEnh.exe
  • Driver version: 19.6.1.22
  • File path: C:\Windows\System32\SynTPEnh.exe
  • File hash: 97EBD7BEB322B86690AAEAB403F363EAA8EEF597D0CD576169456CA6AABA18DC

graememeyer avatar Dec 03 '23 14:12 graememeyer

This bug has now reoccurred, and I have observed it happening:

A - when the machine is first booted (before the user logs in) B - with a different set of peripheral devices - a Dell U2722DE Monitor (USB-C cable/connector), and Microsoft Sculpt Keyboard (USB Adaptor plugged into the Dell monitor).

I am currently on Power Toys 0.76.2.

I have just tested disabling the Keyboard Manager module in PT and restarting, but the bug persists. I will attempt to gather a Focus Logger trace later today as well.

graememeyer avatar Dec 27 '23 14:12 graememeyer

Uninstalling PowerToys has again resolved the issue. I managed to capture a FocusLogger trace before and after the uninstall, capturing the bug/issue in-action and after resolution.

The sequence of events:

  • At roughly 30 seconds past the minute, I lock the screen
  • At 35 seconds past the minute I press enter on my keyboard to see if the lock screen opens up to show the enter PIN screen (with PT installed nothing happens, after PT is uninstalled the enter-PIN window appears)
  • At 40 seconds past the minute, if using the keyboard to dismiss the lock screen's picture didn't work I use the mouse to click on the lock screen and dismiss it
  • At 45 seconds past the minute I start typing in my PIN and the PC unlocks.

With PowerToys installed: With Power Toys Installed

After PowerToys has been uninstalled: With Power Toys Uninstalled

I don't know quite what to make of these traces yet, but I'm still thinking about it.

graememeyer avatar Dec 27 '23 14:12 graememeyer

I see in the 0.77 release that Keyboard manager does not register low level hook if there are no remappings anymore.. I will observe if this has had any impact on this bug and report back in a few days. I am not currently observing the bug, which is a good sign.

graememeyer avatar Jan 11 '24 12:01 graememeyer

Any update on this? Have you seen the issue with 0.77 or 0.78? /needinfo

TheJoeFin avatar Feb 02 '24 22:02 TheJoeFin

Negative, I haven’t seen a reoccurrence of this yet. Given the delay before it reoccurred last time, I was going to give it another couple of weeks before closing. I also have a pc that’s stuck on an older version for now (my work pc) that may still experience the issue. I’ll report back in say 2 weeks if I haven’t seen it again.

graememeyer avatar Feb 03 '24 09:02 graememeyer

I haven't re experienced this issue, so I think we can close this as complete.

graememeyer avatar Feb 17 '24 09:02 graememeyer