This project is read-only.

where is KeyEventArgsExt!?


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)
//TODO: ...
What I want:
private void k_keyboardListener_KeyboardDown(object sender, MouseKeyboardActivityMonitor.KeyEventArgsExt e)
//TODO: ...
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;


zougi wrote Sep 7, 2014 at 8:09 PM

Note: I'm using V4 alpha 2. on a visual studio 2012 project.

zougi wrote Sep 7, 2014 at 8:26 PM

"[" wasn't the best example because :
e.KeyData gives OemOpenBrackets when I press this key which I can understand
but the worst is when I press "!" on my qwerty:
I get: D1, Shift

wrote Sep 7, 2014 at 8:31 PM

wrote Sep 7, 2014 at 8:31 PM

wrote Sep 7, 2014 at 8:41 PM

wrote Sep 7, 2014 at 9:10 PM

wrote Sep 7, 2014 at 9:10 PM