Open todatamining opened 3 years ago
globalmousekeyhook is a nice API.
I am wondering if it is possible to eat an key event. For example, I hook the keydown event and capture "LControlKey".
m_Events.KeyDown += OnKeyDown; private void OnKeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.LControlKey) { //do something } }
After Left Control is handled by function OnKeyDown, I want to drop this key event, so it won't be handled by the system. Is it possible?
I think you just make the last thing you do e.Handled = true
e.Handled = true
It seems that does not work.
globalmousekeyhook is a nice API.
I am wondering if it is possible to eat an key event. For example, I hook the keydown event and capture "LControlKey".
After Left Control is handled by function OnKeyDown, I want to drop this key event, so it won't be handled by the system.
Is it possible?