how to capture the '#' character on different locale keyboards in WPF/C#?

前端 未结 2 1090
既然无缘
既然无缘 2020-11-27 05:02

My WPF application handles keyboard presses and specifically the # and * character as it is a VoIP phone.

I have a bug though with international keyboards, and in pa

2条回答
  •  心在旅途
    2020-11-27 05:35

    I found a helpful solution in this post: http://www.codewrecks.com/blog/index.php/2008/05/06/wpf-convert-systemwindowsinputkey-to-char-or-string-2/

    There is another event TextInput or PreviewTextInput which gives the character as string instead of the Key :).

提交回复
热议问题