{"id":15373109,"url":"https://github.com/vi/virtual_touchscreen","last_synced_at":"2025-07-15T05:34:31.829Z","repository":{"id":2562154,"uuid":"3541405","full_name":"vi/virtual_touchscreen","owner":"vi","description":"Simple evdev linux device driver and GUI program to simulate multitouch touchscreen","archived":false,"fork":false,"pushed_at":"2023-03-15T11:25:35.000Z","size":32,"stargazers_count":92,"open_issues_count":4,"forks_count":34,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T13:44:23.528Z","etag":null,"topics":["gui","linux","linux-kernel-module","touchscreen","virtual"],"latest_commit_sha":null,"homepage":"","language":"C","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/vi.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}},"created_at":"2012-02-25T01:05:13.000Z","updated_at":"2025-02-25T12:39:36.000Z","dependencies_parsed_at":"2022-08-29T02:41:32.429Z","dependency_job_id":null,"html_url":"https://github.com/vi/virtual_touchscreen","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fvirtual_touchscreen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fvirtual_touchscreen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fvirtual_touchscreen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vi%2Fvirtual_touchscreen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vi","download_url":"https://codeload.github.com/vi/virtual_touchscreen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991511,"owners_count":21194893,"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":["gui","linux","linux-kernel-module","touchscreen","virtual"],"created_at":"2024-10-01T13:54:18.255Z","updated_at":"2025-04-15T01:42:36.235Z","avatar_url":"https://github.com/vi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# virtual_touchscreen\n\nSimple virtual input device for testing things in Linux. Creates a character device and an input device.\n\n![screenshot](screenshot.png).\n\n# Building\n\n## module\n\nBuilding for current kernel:\n\n    make\n\nBuilding for custom kernel (from a configured kernel directory):\n\n    make modules M=/path/to/virtual_touchscreen/\n\n## application\n\nUse run `virtual_touchscreen.clj` or just use pre-built `virtual_touchscreen.jar` from Github releases\n\n# Using\n\n## Some testing\n\n```\n# insmod virtual_touchscreen.ko\n# dmesg | grep virtual_touchscreen\nvirtual_touchscreen: Major=250\n# cat /dev/virtual_touchscreen\nUsage: write the following commands to /dev/virtual_touchscreen:\n    x num  - move to (x, ...)\n    y num  - move to (..., y)\n    d 0    - touch down\n    u 0    - touch up\n    s slot - select multitouch slot (0 to 9)\n    a flag - report if the selected slot is being touched\n    e 0   - trigger input_mt_report_pointer_emulation\n    X num - report x for the given slot\n    Y num - report y for the given slot\n    S 0   - sync (should be after every block of commands)\n    M 0   - multitouch sync\n    T num - tracking ID\n    also 0123456789:; - arbitrary ABS_MT_ command (see linux/input.h)\n  each command is char and int: sscanf(\"%c%d\",...)\n  \u003cs\u003ex and y are from 0 to 1023\u003c/s\u003e Probe yourself range of x and y\n  Each command is terminated with '\\n'. Short writes == dropped commands.\n  Read linux Documentation/input/multi-touch-protocol.txt to read about events\n\n1# printf 'x 200\\ny 300\\nS 0\\n' \u003e /dev/virtual_touchscreen\n1# printf 'd 0\\nS 0\\n' \u003e /dev/virtual_touchscreen\n1# printf 'u 0\\nS 0\\n' \u003e /dev/virtual_touchscreen\n\n2# hd /dev/input/event11 # or whatever udev assigns\n# printf 'x 200\\ny 300\\nS 0\\n' \u003e /dev/virtual_touchscreen\n# printf 'd 0\\nS 0\\n' \u003e /dev/virtual_touchscreen\n# printf 'u 0\\nS 0\\n' \u003e /dev/virtual_touchscreen\n```\n\nAnd events should flow from the newly created input device:\n\n```\n# hd /dev/input/event11 # or whatever udev assigns\n00000000  df 32 48 4f a6 10 02 00  03 00 00 00 c8 00 00 00  |.2HO............|\n00000010  df 32 48 4f ab 10 02 00  03 00 01 00 2c 01 00 00  |.2HO........,...|\n00000020  df 32 48 4f bf 10 02 00  00 00 00 00 00 00 00 00  |.2HO............|\n00000030  e3 32 48 4f af af 09 00  01 00 4a 01 01 00 00 00  |.2HO......J.....|\n00000040  e3 32 48 4f bc af 09 00  00 00 00 00 00 00 00 00  |.2HO............|\n00000050  e7 32 48 4f 3d bb 05 00  01 00 4a 01 00 00 00 00  |.2HO=.....J.....|\n00000060  e7 32 48 4f 50 bb 05 00  00 00 00 00 00 00 00 00  |.2HOP...........|\n```\n\n## GUI\n\nThere is a GUI application that can also provide data for virtual touchscreen: `virtual_touchscreen.clj`. ([pre-built bundled version](https://vi-server.org/pub/virtual_touchscreen.jar); SHA256=917698e287e1b707e09c3040d6347f5f041d7a60fef0a6f5e51c2b93ccd39f3c, also available on Github Releases)\n\nIt listens port 9494 and provides virtual_touchscreen input for connected clients.\n\nExample (checked with Clojure 1.3, may need updating):\n\n    hostA$  java -cp clojure.jar clojure.main virtual_touchscreen.clj\n\n    hostB#  nc hostA 9494 \u003e /dev/virtual_touchscreen\n\n## Misc\n\nThere is also experimental script to read `/dev/input/eventX` of some real device and output data for virtual_touchscreen. It is long unmaintained although. Maybe see forks for alternative script.\n\n## Licence\n\nKernel module's licence is GPL. GUI app's license is MIT or Apache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fvirtual_touchscreen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvi%2Fvirtual_touchscreen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvi%2Fvirtual_touchscreen/lists"}