Closed morphx666 closed 5 days ago
When pressing SHIFT + ; I'm expecting e.Key to be equal to Semicolon
SHIFT + ;
e.Key
Semicolon
When pressing SHIFT + ;, e.Key is set to None, although e.KeyChar contains the correct character.
None
e.KeyChar
renderControl.KeyDown += (sender, e) => { Debug.WriteLine("Key: " + e.Key); Debug.WriteLine("KeyData: " + e.KeyData); Debug.WriteLine("KeyChar: " + e.KeyChar); Debug.WriteLine("----------------------------------"); HandleKeyDown(this, new XKeyEventArgs(KeyToInt(e.Key), KeyToInt(e.Modifiers))); e.Handled = true; };
In this context, renderControl is a Canvas control with the CanFocus property set to true.
renderControl
Canvas
CanFocus
true
Here's the output from the code above, after pressing ; first and then SHIFT + ;
;
Key: Semicolon KeyData: Semicolon KeyChar: ; ---------------------------------- Key: LeftShift KeyData: LeftShift, Shift KeyChar: ---------------------------------- Key: None KeyData: Shift KeyChar: : ----------------------------------
Here's a list of some of the keys that don't seem to work with SHIFT:
SHIFT
0-9, [, ], ;, ', ,, ., /,-,`
0-9
[
]
'
,
.
/
-
`
Expected Behavior
When pressing
SHIFT + ;
I'm expectinge.Key
to be equal toSemicolon
Actual Behavior
When pressing
SHIFT + ;
,e.Key
is set toNone
, althoughe.KeyChar
contains the correct character.Code that Demonstrates the Problem
In this context,
renderControl
is aCanvas
control with theCanFocus
property set totrue
.Here's the output from the code above, after pressing
;
first and thenSHIFT + ;
Specifications
Addendum
Here's a list of some of the keys that don't seem to work with
SHIFT
:0-9
,[
,]
,;
,'
,,
,.
,/
,-
,`