MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: OnKeyDown event not received when typing keys "p", "o", "i" on PDFViewer
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
When I open a pdf file on webview 2, I want to block users from using Ctrl + P to print. The OnKeyDown event doesn't recognize the P key so I can't intercept it
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime), Prerelease (Edge Canary/Dev/Beta)
Runtime Version
126.0.25.92.102
SDK Version
No response
Framework
Winforms
Operating System
Windows 10
OS Version
Enterprise LTSC 1809
Repro steps
- Attach the OnKeyDown event to webview2
- Open a PDF file
- Press P, O, I....
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the listed steps in a WinForms WebView2 PDF viewer on Windows 10, testing the P, O, and I keys and comparing behavior with the corresponding Edge version. Trace the OnKeyDown event path using the provided runtime details; done means the affected key events are received while viewing a PDF, or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100