How to convert keyboard hook that can understand all the keys and display the desired character?

Using class: UserActive

Shell.Text - This is the "textBox".

I display the character I need in this way:

public void keydown(KeyboardHook.VKeys key) { if (InputLanguage.CurrentInputLanguage.Culture.ToString() == "ru-RU") { if (key == KeyboardHook.VKeys.KEY_A) { Shell.Text += "ф"; } else if (key == KeyboardHook.VKeys.KEY_B) { Shell.Text += "и"; } else if (key == KeyboardHook.VKeys.SPACE) { Shell.Text += " "; } else if (key == KeyboardHook.VKeys.KEY_Q) { Shell.Text += "й"; } } 

etc

In order not to use if else I think I can do it through a case switch ?, TounicodeEx? not to write such a long code, how can I shorten it, and how can I convert it to TounicodeEx? on the example of my code ...

Here is a link to the classes that were used: Hooks

0