isolver / ioHub

A Python program, running as an independent process, that provides a 'proxy like' service for experiment runtimes ( psychopy ) and devices ( keyboard, mouse, parallel port, eye tracker, ... ).
19 stars 14 forks source link

Implement windows LL hooks as small DLL plus ctypes #35

Open isolver opened 11 years ago

isolver commented 11 years ago

Py hook could be replaced quite easily with a small C DLL proving the LL hook bridge to python callbacks. Rest of functionality could be ctypes. The DzlL for the actual hook init. And callback is because the LL hooks must point to functions in a DLL, since they are injected into the event processing pipeline. The C callbacks could inturn call python callbacks though. Or, event queuing could be done in the C DLL and timed polling of an event queue could be done, since we are using a timed poll to pump the msg que anyhow for window events.

The would remove py hook as a dependency, and address any possible unicode issues that may exist with pyhook.