Handling VirtualKey in Windows 8 Store Apps with C#

后端 未结 2 1777
北恋
北恋 2021-01-18 10:24

I\'m aware of how to handle key events, i.e.

private void Page_KeyUp(object sender, KeyRoutedEventArgs e)
{
  switch (e.Key)
  {
    case Windows.System.Virt         


        
2条回答
  •  星月不相逢
    2021-01-18 10:54

    You can't easily get this information from KeyUp because KeyUp only knows which keys are being pressed, not which letters are being typed. You could check for the shift key being down and you could also try to track caps lock yourself. Better you use TextChanged event.

提交回复
热议问题