Touchpad server application

Control a computer using a touch-screen phone or tablet

Description

This application allows the mouse cursor on a computer to be controlled by a web application over a WebSocket connection. Usually the web application runs on a touch-screen phone or tablet. It is also possible to utilise the server as part of remote control tools. Secure connections require a certificate file in the current directory with the name gvalkov.com.pem.

Low latency control experience

The only factor affecting latency is the network medium. No noticeable latency is observed over LAN cable: less than 1 ms, or Wi-Fi: around 4 ms. With LTE however, the experience is affected by due to the higher latency: around 40-80 ms.

Video demo gTouchpad

gTouchpad

Touchpad protocol

MessageParametersDescription
downchar:{LRMX}Activate mouse button
downLActivate mouse button: Left
downRActivate mouse button: Right
downMActivate mouse button: Middle
downXActivate mouse button: Thumb (Back)
upchar:{LRMX}Deactivate mouse button
upLDeactivate mouse button: Left
upRDeactivate mouse button: Right
upMDeactivate mouse button: Middle
upXDeactivate mouse button: Thumb (Back)
touchstartint:X,int:YInformational, does not do anything
touchendInformational, does not do anything
touchcancelInformational, does not do anything
touchmoveint:dX,int:dYMove the cursor
scrollint:dX,int:dYSend a scroll event
zoomint:dZSend a zoom event

Sample protocol

touchstart 54,450   # touchstart at X=54, Y=450 (informational, ignored)
touchmove 0,-27     # touchmove dX=0, dY=-27
touchmove 0,-33
touchmove 1,-27
touchend            # touchend (informational, ignored)
touchstart 80,122
down L              # Activate mouse button: Left
touchend
up L                # Deactivate mouse button: Left
touchstart 223,121
down M, up M        # Click mouse button: Middle
touchstart 269,297
scroll -6,-40       # Send a scroll event dX=-6, dY=-40
scroll 0,-46
touchend
touchend
touchstart 262,67
touchstart 261,66
zoom -24            # Send a zoom event dZ=-24
zoom -26
zoom -23

Supported Platforms

☂︎ Apple iOS, macOS
☂︎ FreeBSD
☂︎ Linux
☂︎ Windows

Prerequisites and build instructions

© 2015-2023 Georgi Valkov

https://httpstorm.com/download/g_touchpad/