Answer the question
In order to leave comments, you need to log in
C#. Keyboard hook. After working out the hook, an extra key appears, how to fix it?
There is a keyboard hook. The program runs in the background, the hook catches pressing the hot key.
When the hotkey is caught, the work goes into the function. In this function, I send a ctrl-Insert combination via SendKeys.Send() to get what the user has currently selected on the clipboard. Then the program fulfills its purpose, the program returns to the hook and it returns return (IntPtr)0; (Well, or it was originally CallBackNextHook ... )
So, on some computers everything works fine, as it should, but on others (windows 10, windows 7 - it's lucky, it mostly works) the selected text is overwritten and the last one is inserted instead letter from the hotkey combination. Let's say I pressed ctrl-G, just G was inserted into the text.
The error occurs strictly on certain computers, but I did not find any pattern.
Can anyone advise?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question