I
I
Igor Mamushin2015-06-23 18:20:04
.NET
Igor Mamushin, 2015-06-23 18:20:04

How to insert special ASCII characters in TextBox on button click?

There is one fairly large application, the user recently needed to insert a special. symbols (like ©, ±, etc.), wrote a module like the on-screen keyboard, only instead of the usual keys there are special characters.
Now a question.
How to insert this special character into the TextBox that is in focus when clicking on the button (1 button - 1 character, respectively) (You don’t need to worry about the focus, the module does not take over the focus and the focus remains in the techbox, you just need to somehow transfer the character to the text box)?
I tried using WinAPI(keybd_event), but there are only keyboard keys, it was not possible to simulate the asci set (alt+0169).
It can and will work through the buffer, but then the user buffer will be overwritten, which is not desirable.
There is a class containing all characters (it actually generates buttons).
PS We use MVVM, ReactiveUI.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jackroll, 2015-06-23
@jackroll

char specificSymbol = '\u0169';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question