Search Results

Search found 3 results on 1 pages for 'keyhook'.

Page 1/1 | 1 

  • C# keyhook question

    - by user203123
    I copied the following code from http://www.codeproject.com/KB/cs/CSLLKeyboardHook.aspx, public int hookProc(int code, int wParam, ref keyboardHookStruct lParam) { if (code >= 0) { Keys key = (Keys)lParam.vkCode; if (HookedKeys.Contains(key)) { KeyEventArgs kea = new KeyEventArgs(key); if((wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN) && (KeyDown != null)) {KeyDown(this, kea) ;} else if ((wParam == WM_KEYUP || wParam == WM_SYSKEYUP) && (KeyUp != null)) {KeyUp(this, kea); } if (kea.Handled) {return 1;} } } lParam.vkCode ++; lParam.scanCode ++; return CallNextHookEx(hhook, code, wParam, ref lParam); } It works fine but when I make a little change: lParam.vkCode ++; or lParam.scanCode ++; right before the return CallNextHookEx(...), the original keys still appears in Notepad. Ex. If I press "a", I expect the letter in Notepad will be "b" but it still "a". It seems like "lParam" doesn't change. Couldn't understand why?

    Read the article

  • Monitor programs accessing my keyboard?

    - by Anti Earth
    As of a few days ago, my computer is behaving 'erratically'. When I am typing, my pointer will randomly move to another place in the text and start typing a semi-random string of characters. ("gvyfn" is common; It has typed this about 8 times whilst I composed all the text above) It often highlights part of or all the text and overwrites it. It sometimes goes into loops of pressing Control-alt-delete down, bringing up Windows 7 menu thing. It sometimes even messes with mouseclicks; they have unexpected results, like requesting admin priveledges from applications, instead of switching to their window. I believe this is because it is holding a alt-function key down. This behaviour happens periodically, in waves. It might subside for an hour, then continue to haunt me. I believe it to be a virus or malicious program. My anti-virus (Symantec) and multiply MS rootkit removers could not find anything suspicious. I've noticed that sometimes it re-maps keys, and types gibberish when I press certain keys (though no pattern is evident). I believe a malicious program has installed a keyhook on my computer. I'm wondering... - Is there a way to let me view which programs are emulating keystrokes? - Is there a way to view what keyboard hooks are installed? (I'm also at liberty to try any other techniques to remove this blasted thing. It is easily the most fustrating computer problem I've encountered). Thanks!

    Read the article

1