Turn the mobile phone into a mouse and touchpad, with the android/iPhone, Windows/MAC source code

Source: Internet
Author: User

The first time I saw trackpad in an apple store, I was deeply attracted by its design. I thought about the features, touch, and wireless connectivity that mobile phones share with it, so it can act as this role.

Later, I found many such programs on the Internet. So I put it on hold and didn't implement it.

However, I recently thought of this thing, and it was really interesting. I realized it in my spare time and made it open-source for the reference of interested friends.

Currently, I have implemented two mobile client versions: Android and iPhone, and Windows and Mac.

Implementation ideas:

  1. Interconnection. The computer sends a broadcast on the LAN and enables the TCP Service. After receiving the broadcast address, the mobile phone establishes a TCP connection with the computer.
  2. Data. The mobile client simulates the three mouse keys and a touchpad. After obtaining the touch data, it passes it to the computer.
  3. Control. Obtain data from the computer, perform simple parsing, and then use the functions provided by the system for control. Windows uses sendinput or mouse_event, while Mac can use cgeventcreatemouseevent to simulate mouse and scroll wheel events.
Each version of the source code is on my GitHub: https://github.com/zhijie/trackpad
Only basic functions, network exceptions, and multiple connections are implemented. Uidesign is not yet performed. I will update it in time :)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.