cobrce / interception_py

A python port (not a wrapper) of interception dll
MIT License
47 stars 12 forks source link
interception keyboard-hook

This repository is unmaintained since 2019, check pyintercept by Kenny Hommel for an up to date version

interception_py

This is a port (not a wrapper) of interception dll to python, it communicates directly with interception's driver

why not using the wrapper?

To make it run you should install the driver from c-interception

example


from interception import  *

if __name__ == "__main__":
    c = interception()
    c.set_filter(interception.is_keyboard,interception_filter_key_state.INTERCEPTION_FILTER_KEY_UP.value)
    while True:
        device = c.wait()
        stroke = c.receive(device)
        if type(stroke) is key_stroke:
            print(stroke.code)
        c.send(device,stroke)