Commit 674042a
committed
fix: Allow standard browser shortcuts (Ctrl+Z, etc.) to pass through to WebView2
Fixes #4723
The AcceleratorKeyCallback was posting all keyboard events to the main window,
which interfered with WebView2's native handling of standard text editing
shortcuts like Ctrl+Z (undo), Ctrl+Y (redo), Ctrl+X (cut), Ctrl+C (copy),
Ctrl+V (paste), and Ctrl+A (select all).
Changes:
- Refactored AcceleratorKeyCallback to check keyboard state once
- Added logic to detect standard Ctrl+key shortcuts (without Alt modifier)
- These shortcuts now bypass posting to main window and are handled by WebView2
- Maintains existing Ctrl+Shift+F12 DevTools functionality
- Preserves menu shortcut handling for all other key combinations1 parent ba2c998 commit 674042a
1 file changed
+29
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
512 | 530 | | |
513 | 531 | | |
| 532 | + | |
514 | 533 | | |
515 | 534 | | |
516 | 535 | | |
| |||
0 commit comments