Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The ToString value is coming back as those various keys because it's getting the Key's name, not necessarily the character value that you're wanting to test. I'd really recommend using the Key enumeration there...</p> <p>As far as your question goes, I'm not 100% certain what you're trying to do (this won't help in video games, etc.), but perhaps the <a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.previewtextinput.aspx" rel="nofollow noreferrer">UIElement.PreviewTextInput event</a> can help out - rather than having to catch individual key presses, you get the actual text input, which helps out in other situations such as when dealing with voice recognition, etc.</p> <p>It appears from your comments that you're trying to capture both non-character indicators as well as character indicators; these can potentially conflict with each other (especially on compressed keyboards), so it seems MS built out the framework in such a way that a situation wasn't accidentally overlooked. (Your particular situation shows the difference between Shift+dash and Shift+? on two different keyboards; I'm certain there's more.) I'd recommend looking for only keypresses and giving the ability to the end user of your app to rework the key bindings.</p> <p>Which reminds me, be careful with the "MouseDown" events, because they won't occur on touch surfaces (such as Microsoft Surface) - it's best to code for all the events available.</p> <p>Good luck with your project!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload