0

Vb.net
I have hooked the keyboard.
When i press "s" key it sends "d"char(thats what i wanted)
but the problem is when i press ctrl+s notepad does not save the doc and sends "d".
How to solve this.

Edited by Simple man: Not

4
Contributors
3
Replies
24
Views
1 Year
Discussion Span
Last Post by Teme64
0

It is likely that dirt in your keyboard is causing this. Get some compressed air and blow the dirt, dust, and detritis out of the keyboard (also holding it upside down and shaking sometimes will dislodge stuff stuck inside). Then try again.

0

You have done keyboard hook with SetWindowsHookEx() API call, right?
When your keyboard delegate gets keycode for S-key, it replaces it with D-key's keycode (for some reason I do not understand), right?
You do know that Ctrl+S sends two separate keycodes, one for Ctrl-key and one for S-key, right?
Now if you press Ctrl+S, your keyboard delegate handles Ctrl-key and then replaces S-key's code with D-key's code, right?
Now if you press Ctrl+S in the Notepad it gets Ctrl+D and Ctrl+D does not save the document, right?

You solve this problem by not replacing S-key with D-key in your keyboard delegate. Right?

HTH

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.