{"id":15532841,"url":"https://github.com/tito/python-mtdev","last_synced_at":"2025-07-20T20:37:36.769Z","repository":{"id":1030493,"uuid":"858707","full_name":"tito/python-mtdev","owner":"tito","description":"Python binding for mtdev","archived":false,"fork":false,"pushed_at":"2010-09-04T22:18:39.000Z","size":179,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T13:40:00.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tito.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-24T09:04:34.000Z","updated_at":"2021-05-20T07:25:55.000Z","dependencies_parsed_at":"2022-07-06T03:00:49.722Z","dependency_job_id":null,"html_url":"https://github.com/tito/python-mtdev","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/tito%2Fpython-mtdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpython-mtdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpython-mtdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tito%2Fpython-mtdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tito","download_url":"https://codeload.github.com/tito/python-mtdev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250440673,"owners_count":21431039,"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":[],"created_at":"2024-10-02T11:33:23.722Z","updated_at":"2025-04-23T13:41:05.797Z","avatar_url":"https://github.com/tito.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"python-mtdev\n============\n\nPython binding for mtdev.\nProject mtdev is available at https://launchpad.net/mtdev\n\n\nInstallation\n------------\n\npython setup.py install\n\n\nTest with a multitouch device\n-----------------------------\n\npython -m mtdev /dev/input/eventX\n\n\nUsage\n-----\n\nExample of code ::\n\n    slot = 0\n    filename = '/dev/input/event3'\n\n    # open the device\n    dev = mtdev.Device(sys.argv[1])\n\n    while True:\n\n        # if no activity, sleep :)\n        if dev.idle(1000):\n            continue\n\n        # read all available data\n        while True\n            data = dev.get()\n            if data is None:\n                break\n\n            # change the slot number\n            if data.type == mtdev.MTDEV_TYPE_EV_ABS and \\\n                data.code == mtdev.MTDEV_CODE_SLOT:\n                slot = data.value\n\n            # print data\n            print dict(slot=slot, code=hex(data.code), \\\n                       type=data.type, value=data.value)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftito%2Fpython-mtdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftito%2Fpython-mtdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftito%2Fpython-mtdev/lists"}