I'd like to get the exact key's character on a key press event. Currently I can get the key's position (= constructer's code) but not the char.
I'd like for example to get the char "[" when I press it. All I can get is "oem1".
From what I understood, I should be able to use KeyEventArgsExt from the event KeyDown of KeyboardHookListener.
Here's my code:
KeyboardHookListener k_keyboardListener = new KeyboardHookListener(new GlobalHooker());
k_keyboardListener.Enabled = true;
k_keyboardListener.KeyDown += k_keyboardListener_KeyboardDown;
k_keyboardListener has no method KeyDownExt. And the only argument k_keyboardListener_KeyboardDown would allow is "System.Windows.Forms.KeyEventArgs e" but I would like "MouseKeyboardActivityMonitor.KeyEventArgsExt e"
What I get:
private void k_keyboardListener_KeyboardDown(object sender, System.Windows.Forms.KeyEventArgs e)
What I want:
private void k_keyboardListener_KeyboardDown(object sender, MouseKeyboardActivityMonitor.KeyEventArgsExt e)
Am I missing something or KeyEventArgsExt is just deactivated?
EDIT: I found a dirty workaround casting KeyEventArgs as KeyEventArgsExt. Why KeyEventArgsExt is not able by default? Maybe you could document it!?
MouseKeyboardActivityMonitor.KeyEventArgsExt ee = e as MouseKeyboardActivityMonitor.KeyEventArgsExt;