I wounder if there is a way to check if a key is clicked?
What I want to achieve is creating something like text editor, I have finished most of the parts. Now when I press on a button, I have a function under element PreviewKeyUp and the other PreviewKeyDown ... Is there something like PreviewKeyClick or KeyClick?
PS: I'm using visual studio 2010 and compiling against .NET Framework 3.5 ... I know I can use 4.0 but 3.5 is due to restrictions on client PC. The application targets a specific client and I can't update the .NET Framework on the client machine. If more details is needed, don't hesitate to ask.
In general, for text editors you would need to handle TextInput (or PreviewTextInput) and KeyDown/PreviewKeyDown events. The latter handles keys not included in TextInput events.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With