c# - Wrong WParam value in IMessageFilter.PreFilterMessage -


i in process implement application-wide keyboard hook 1 of applications.
done using imessagefilter implementation overriding prefiltermessage method , adding imessagefilter main form.
far able test, of number , letter keys work without problem, when comes to, let's say, keys.left (code 37), wparam of message contains a, seems, wrong value (code 39).
, yes, did bit-and keys.keycode (which 65535 btw. means wouldn't matter).

if has idea or hint why works letter/number keys not keys.left highly appreciate that.

code:

public bool prefiltermessage(ref message m) {     if(m.msg == wm_keydown)     {         _keytable[(keys)m.wparam & keys.keycode] = true;     }      if(m.msg == wm_keyup)     {         _keytable[(keys)m.wparam & keys.keycode] = false;     }      return false; } 


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -