Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CefSharp.Wpf/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,10 @@ private void OnPreviewKey(KeyEventArgs e)
// trigger the appropriate WM_ messages handled by our SourceHook, so we have to handle these extra keys here.
// Hooking the Tab key like this makes the tab focusing in essence work like
// KeyboardNavigation.TabNavigation="Cycle"; you will never be able to Tab out of the web browser control.
// We also add the condition to allow ctrl+a to work when the web browser control is put inside listbox.
if (e.Key == Key.Tab || e.Key == Key.Home || e.Key == Key.End || e.Key == Key.Up
|| e.Key == Key.Down || e.Key == Key.Left || e.Key == Key.Right)
|| e.Key == Key.Down || e.Key == Key.Left || e.Key == Key.Right
|| (e.Key == Key.A && Keyboard.Modifiers == ModifierKeys.Control))
{
var modifiers = GetModifiers(e);
var message = (int)(e.IsDown ? WM.KEYDOWN : WM.KEYUP);
Expand Down