Browse Source

Fix unable to type cultural character (#15394)

Check KeySymbol before return null in TryCreateRawKeyEventArgs to prevent skipping cultural character.

Co-authored-by: CKPhong <phong.chung@itd.com.vn>
release/11.1.0-beta2
dieuminhs 2 years ago
committed by Max Katz
parent
commit
9b8e772716
  1. 5
      src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs

5
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs

@ -1191,12 +1191,11 @@ namespace Avalonia.Win32
var keyData = ToInt32(lParam);
var key = KeyInterop.KeyFromVirtualKey(virtualKey, keyData);
var physicalKey = KeyInterop.PhysicalKeyFromVirtualKey(virtualKey, keyData);
var keySymbol = KeyInterop.GetKeySymbol(virtualKey, keyData);
if (key == Key.None && physicalKey == PhysicalKey.None)
if (key == Key.None && physicalKey == PhysicalKey.None && string.IsNullOrWhiteSpace(keySymbol))
return null;
var keySymbol = KeyInterop.GetKeySymbol(virtualKey, keyData);
return new RawKeyEventArgs(
WindowsKeyboardDevice.Instance,
timestamp,

Loading…
Cancel
Save