Open Bug 1754973 Opened 4 years ago Updated 4 years ago

On a Surface Pro 8, Windows 10 Home 21H2 (last update) 64bit after unplugging the keyboard on-screen keyboard (OSK) does not come up when attempting to input text

Categories

(Core :: Widget: Win32, defect, P2)

Desktop
All
defect

Tracking

()

REOPENED
Tracking Status
firefox99 --- affected

People

(Reporter: Gijs, Unassigned)

References

Details

(Whiteboard: [win:touch])

Attachments

(1 file)

See bug 1221947 comment 60 and later.

keyboardDisplayReason says "IKPOS: keyboard presence confirmed", which means we're hitting code at https://searchfox.org/mozilla-central/rev/81c52abeec336685330af5956c37b4bcf8926476/widget/windows/WinIMEHandler.cpp#923-929 that detects a device that looks like a keyboard.

Thanks, the pen included in the signature keyboard and a mouse are still connected by blutooth if that helps. Notepad++ is able
to detect the absence of the keyboard (https://github.com/notepad-plus-plus/notepad-plus-plus)

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

:spohl, are we sure this is a dupe? It seems like bug 1750584 is about detecting tablet mode (a separate OS mode) in Win11, and this is about detecting the presence/absence of a physical keyboard on a specific machine under Win10.

Flags: needinfo?(spohl.mozilla.bugs)

(At least on win10, you shouldn't need to enter "tablet mode" for the on-screen keyboard to work.)

https://bugzilla.mozilla.org/show_bug.cgi?id=1750584
I confirm I'm having the problem in windows 10 and tablet mode disabled.
Ms Edge or Notepad++ show the onscreen keyboard when the physical one has been disconnected.
Firefox doesn't

(In reply to :Gijs (he/him) from comment #4)

:spohl, are we sure this is a dupe? It seems like bug 1750584 is about detecting tablet mode (a separate OS mode) in Win11, and this is about detecting the presence/absence of a physical keyboard on a specific machine under Win10.

I should have probably left a comment for my thinking here. Although this issue is distinct from the issue described in bug 1750584, the fix for bug 1750584 is expected to fix the issue in this bug as well. I based this on the last part of Gabriele's bug 1750584 comment 4:

(In reply to Gabriele Svelto [:gsvelto] from bug 1750584 comment 4)

[...] Either way the fix for this is probably the same as for bug 1722208: avoid detecting tablet mode by reading the UserInteractionMode via the UIViewSettings and revert to the APIs that were used before Windows 10 to detect when the keyboard is flipped or disconnected.

I'll go ahead and reopen this bug and mark it blocked by bug 1750584. Once bug 1750584 is fixed, we can verify that it fixes the issue here as well.

Status: RESOLVED → REOPENED
Depends on: 1750584
Flags: needinfo?(spohl.mozilla.bugs)
Resolution: DUPLICATE → ---
Severity: -- → S3
Priority: -- → P2

(In reply to Stephen A Pohl [:spohl] from comment #7)

(In reply to :Gijs (he/him) from comment #4)

:spohl, are we sure this is a dupe? It seems like bug 1750584 is about detecting tablet mode (a separate OS mode) in Win11, and this is about detecting the presence/absence of a physical keyboard on a specific machine under Win10.

I should have probably left a comment for my thinking here. Although this issue is distinct from the issue described in bug 1750584, the fix for bug 1750584 is expected to fix the issue in this bug as well. I based this on the last part of Gabriele's bug 1750584 comment 4:

(In reply to Gabriele Svelto [:gsvelto] from bug 1750584 comment 4)

[...] Either way the fix for this is probably the same as for bug 1722208: avoid detecting tablet mode by reading the UserInteractionMode via the UIViewSettings and revert to the APIs that were used before Windows 10 to detect when the keyboard is flipped or disconnected.

I'll go ahead and reopen this bug and mark it blocked by bug 1750584. Once bug 1750584 is fixed, we can verify that it fixes the issue here as well.

I think the logging in the screenshot shows that we already don't rely on tablet mode for this case - Obviously I don't have a debugger on the reporter's machine, but I expect that AutoInvokeOnScreenKeyboardInDesktopMode returns true, also based on bug 1221947 comment 60:

"Show the touch keyboard or handwriting panel when not in tablet mode and there's no keyboard attached" is set to ON.

So I don't think removing the tablet mode check helps here. The bug you referenced changed https://searchfox.org/mozilla-central/rev/81c52abeec336685330af5956c37b4bcf8926476/widget/windows/WinIMEHandler.cpp#739-745 , but even before that we check IMEHandler::NeedOnScreenKeyboard which checks IMEHandler::IsKeyboardPresentOnSlate which logs the about:config string in the screenshot from https://searchfox.org/mozilla-central/rev/81c52abeec336685330af5956c37b4bcf8926476/widget/windows/WinIMEHandler.cpp#935 , which means we'll return true from IsKeyboardPresentOnSlate which means returning false from NeedOnScreenKeyboard which means we bail out before we get to the tablet mode check anyway.

I'm triaging/re-triaging the entire Widget:Win32 component at the moment and it is true that I missed this difference as I'm working through ~900 open bugs. Feel free to let me know anytime you think there was a mistake in this triage effort. Your input here will help to get this bug addressed quicker. Thank you!

No longer depends on: 1750584
See Also: → 1750584
Whiteboard: [win:touch]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: