{"id":20315800,"url":"https://github.com/flipeador/python-interception-driver","last_synced_at":"2026-02-28T10:04:18.449Z","repository":{"id":157621915,"uuid":"383183840","full_name":"flipeador/Python-Interception-Driver","owner":"flipeador","description":"Python 3 port of Interception Driver","archived":false,"fork":false,"pushed_at":"2022-04-30T01:49:26.000Z","size":38,"stargazers_count":18,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T13:38:17.500Z","etag":null,"topics":["interception-driver","python","python3","windows"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flipeador.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-05T15:19:27.000Z","updated_at":"2025-02-23T13:50:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b78ad8f3-787a-4e96-9823-f218b9476031","html_url":"https://github.com/flipeador/Python-Interception-Driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipeador%2FPython-Interception-Driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipeador%2FPython-Interception-Driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipeador%2FPython-Interception-Driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flipeador%2FPython-Interception-Driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flipeador","download_url":"https://codeload.github.com/flipeador/Python-Interception-Driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449970,"owners_count":21105593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interception-driver","python","python3","windows"],"created_at":"2024-11-14T18:21:52.862Z","updated_at":"2026-02-28T10:04:13.408Z","avatar_url":"https://github.com/flipeador.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python-Interception-Driver\n\nhttp://www.oblita.com/interception\n\n### Example:\n```py\n#from interception import Interception, MouseFilter, KeyFilter, MouseFlags,\\\n#    MouseState, KeyState, MapVk, Vk, map_virtual_key\n\nRUNNING = True\nTIMEOUT = 2500 # ms\n\ninterception = Interception()\n\ninterception.set_mouse_filter(MouseFilter.ButtonAll)\ninterception.set_keyboard_filter(KeyFilter.All)\n\nwhile RUNNING:\n    device = interception.wait_receive(TIMEOUT)\n\n    if device:\n        print(f'{device.get_hardware_id()}:')\n\n        # Mouse\n        if device.is_mouse:\n            print('MouseStroke(flags={1},state={2},rolling={0.rolling},x={0.x},y={0.y},info={0.info})'\n                  .format(device.stroke, MouseFlags(device.stroke.flags).name, MouseState(device.stroke.state).name))\n\n        # Keyboard\n        elif device.is_keyboard:\n            vk = map_virtual_key(device.stroke.code, MapVk.ScToVk)\n            print('KeyStroke(sc={0.code:03X},vk={2:03X},state={1},info={0.info})'\n                  .format(device.stroke, KeyState(device.stroke.state).name, vk))\n            # escape = terminate\n            if vk == Vk.Escape:\n                RUNNING = False\n            # switch x and y\n            elif vk == Vk.X:\n                device.stroke.code = map_virtual_key(Vk.Y, MapVk.VkToSc)\n            elif vk == Vk.Y:\n                device.stroke.code = map_virtual_key(Vk.X, MapVk.VkToSc)\n\n        device.send()\n        print('-'*100)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipeador%2Fpython-interception-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflipeador%2Fpython-interception-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflipeador%2Fpython-interception-driver/lists"}