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>
pull/15422/head
dieuminhs
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
3 deletions
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs
@ -1191,12 +1191,11 @@ namespace Avalonia.Win32
var keyData = ToInt32 ( lParam ) ;
var keyData = ToInt32 ( lParam ) ;
var key = KeyInterop . KeyFromVirtualKey ( virtualKey , keyData ) ;
var key = KeyInterop . KeyFromVirtualKey ( virtualKey , keyData ) ;
var physicalKey = KeyInterop . PhysicalKeyFromVirtualKey ( 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 ;
return null ;
var keySymbol = KeyInterop . GetKeySymbol ( virtualKey , keyData ) ;
return new RawKeyEventArgs (
return new RawKeyEventArgs (
WindowsKeyboardDevice . Instance ,
WindowsKeyboardDevice . Instance ,
timestamp ,
timestamp ,