MicrosoftEdge / MicrosoftEdge/WebView2Feedback

[Problem/Bug]: OnKeyDown event not received when typing keys "p", "o", "i" on PDFViewer

Open
#4,721 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
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
  1. Attach the OnKeyDown event to webview2
  2. Open a PDF file
  3. 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

AB#53007917

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.