Skip to content

Commit e5a35b8

Browse files
committed
big README change
1 parent 465e64f commit e5a35b8

File tree

2 files changed

+43
-16
lines changed

2 files changed

+43
-16
lines changed

README README.md

+43-16
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
1-
Simple virtual input device to testing things in Linux. Creates character device and input device.
1+
# virtual_touchscreen
22

3-
Building (from configured Linux kernel's directory):
3+
Simple virtual input device for testing things in Linux. Creates a character device and an input device.
44

5-
"make modules M=~/src/virtual_touchscreen/"
5+
![screenshot](screenshot.png).
66

7-
Using:
87

9-
1# insmod virtual_touchscreen.ko
10-
1# dmesg | grep virtual_touchscreen
8+
# Building
9+
10+
## module
11+
12+
From a configured Linux kernel's directory:
13+
14+
make modules M=~/src/virtual_touchscreen/
15+
16+
## application
17+
18+
Use run `virtual_touchscreen.clj` or just use pre-built `virtual_touchscreen.jar` from Github releases
19+
20+
# Using
21+
22+
23+
## Some testing
24+
25+
```
26+
# insmod virtual_touchscreen.ko
27+
# dmesg | grep virtual_touchscreen
1128
virtual_touchscreen: Major=250
12-
1# cat /dev/virtual_touchscreen
29+
# cat /dev/virtual_touchscreen
1330
Usage: write the following commands to /dev/virtual_touchscreen:
1431
x num - move to (x, ...)
1532
y num - move to (..., y)
@@ -29,26 +46,36 @@ Usage: write the following commands to /dev/virtual_touchscreen:
2946
Each command is terminated with '\n'. Short writes == dropped commands.
3047
Read linux Documentation/input/multi-touch-protocol.txt to read about events
3148
32-
1# printf 'x 200\ny 300\nS 0\n' > /dev/virtual_touchscreen
33-
1# printf 'd 0\nS 0\n' > /dev/virtual_touchscreen
34-
1# printf 'u 0\nS 0\n' > /dev/virtual_touchscreen
49+
# printf 'x 200\ny 300\nS 0\n' > /dev/virtual_touchscreen
50+
# printf 'd 0\nS 0\n' > /dev/virtual_touchscreen
51+
# printf 'u 0\nS 0\n' > /dev/virtual_touchscreen
52+
```
3553

36-
2# hd /dev/input/event11 # or whatever udev assigns
54+
And events should flow from the newly created input device:
55+
56+
```
57+
# hd /dev/input/event11 # or whatever udev assigns
3758
00000000 df 32 48 4f a6 10 02 00 03 00 00 00 c8 00 00 00 |.2HO............|
3859
00000010 df 32 48 4f ab 10 02 00 03 00 01 00 2c 01 00 00 |.2HO........,...|
3960
00000020 df 32 48 4f bf 10 02 00 00 00 00 00 00 00 00 00 |.2HO............|
4061
00000030 e3 32 48 4f af af 09 00 01 00 4a 01 01 00 00 00 |.2HO......J.....|
4162
00000040 e3 32 48 4f bc af 09 00 00 00 00 00 00 00 00 00 |.2HO............|
4263
00000050 e7 32 48 4f 3d bb 05 00 01 00 4a 01 00 00 00 00 |.2HO=.....J.....|
4364
00000060 e7 32 48 4f 50 bb 05 00 00 00 00 00 00 00 00 00 |.2HOP...........|
65+
```
66+
67+
## GUI
4468

45-
There is also experimental script to read /dev/input/eventX of some real device and output data for virtual_touchscreen.
69+
There 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)
4670

47-
There is GUI application that can also provide data for virtual touchscreen
48-
(virtual_touchscreen.clj, bundled version: https://vi-server.org/pub/virtual_touchscreen.jar , SHA256 (virtual_touchscreen.jar) = 917698e287e1b707e09c3040d6347f5f041d7a60fef0a6f5e51c2b93ccd39f3c)
4971
It listens port 9494 and provides virtual_touchscreen input for connected clients.
5072

5173
Example:
52-
hostA$ java -cp clojure.jar clojure.main virtual_touchscreen.clj
5374

54-
hostB# nc hostA 9494 > /dev/virtual_touchscreen
75+
hostA$ java -cp clojure.jar clojure.main virtual_touchscreen.clj
76+
77+
hostB# nc hostA 9494 > /dev/virtual_touchscreen
78+
79+
## Misc
80+
81+
There 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.

screenshot.png

4.77 KB
Loading

0 commit comments

Comments
 (0)