View difference between Paste ID: iAQsQHPS and yyQwHktr
SHOW: | | - or go back to the newest paste.
1
...
2
SetWindowsHookEx(WH_KEYBOARD_LL, hook_proc(), null, 0);
3
...
4
5
function hook_proc() {
6-
  var prevstate;
6+
  var someState;
7-
  var newstate;
7+
8
    // someState is captured in this closure
9
    ...
10
  };
11
}