I am writing a program that monitors a pressed key (at any process). I am successfully getting the pressed key, but the only problem is that I get that key at English, even though the pressed key was of another language (lets say Spanish). So, I thought of a solution: create a dictionary of key codes and their Spanish definitions, and identify the keyboard language at the moment of the key press.
Do you think that is a good solution? If so - my problem is that I cannot get the current keyboard language (on my Windows 10 machine). I have tried several ways, like:
1. GetKeyboardLayout
2. CultureInfo
3. InputLanguage