Skip to content

InputShare enables you to share the keyboard and mouse of your computer with an Android device via ADB in wired / wireless way.

License

Notifications You must be signed in to change notification settings

BHznJNs/InputShare

Repository files navigation

InputShare

中文介绍

InputShare enables you to share the keyboard and mouse of your computer with an Android device via ADB in wired / wireless way.

Features

  • Seamless Switching: Quickly switch keyboard and mouse input between the PC and Android device with hotkey.
  • Wired / Wireless Connection: Supports both wired and wireless connections for flexible input sharing.
  • Wide Compatibility: Compatible with various Android devices, not a specific brand.
  • Clipboard Sync: Seamlessly sync clipboard content between your computer and Android device.
  • Easy-to-Use GUI

Screenshots

Pairing UI Connecting UI System Tray

Install

Go to the [release page][https://github.com/BHznJNs/InputShare/releases] and download the latest compressed package, uncompress it and the executable is in it.

Usage

You firstly need to enable the Developer Settings of your Android device.

For wired connection:

  1. Enable the USB Debugging in the Developer Settings page
  2. Connect your device with computer via a USB cable
  3. Just run the executable and skip the pairing and connecting steps
  4. Enjoy your mouse and keyboard on Android device

For wireless connection:

  1. Enable the Wireless Debugging in the Developer Settings page
  2. Run the executable
  3. On your Android device: Open Pair device with pairing code option and input the IP address and port and the pairing code into the pairing tab of connecting window (This is the pairing step which is generally needed for the first time use)
  4. Input the IP address and port in the main Wireless Debugging into the connecting tab of connection window
  5. Enjoy your mouse and keyboard on Android device

Shortcuts

The shortcuts following are available after connection:

Shortcut Description
<Ctrl>+<Alt>+s toggle the control between your computer and your Android device
<Ctrl>+<Alt>+q quit the program
F1 Multi-task switching
F2 Return to Home
F3 Back
F4 Previous Media
F5 Play / Pause Media
F6 Next Media
F7 Volume Down
F8 Volume Up
F9 Brightness Down
F10 Brightness Up
F11 Screen Sleep
F12 Wake Up

The shortcuts following are available after connection and not sharing:

Shortcut Description
<Alt>+UP Scroll Up
<Alt>+DOWN Scroll Down
<Alt>+[ Previous Media
<Alt>+] Next Media
<Alt>+\ Play / Pause Media

FAQ

How to enable wireless debugging quickly?

You can refer to this video to add the Wireless Debugging to Quick Setting Shortcut: How To Add / Remove Wireless Debugging Quick Setting Shortcut

Does it share the screen of Android device to the computer?

No, InputShare only shares the keyboard and mouse, it will not mirror the screen of your Android device to your computer.

Do I need to configure ADB by myself?

No, there is a built-in ADB packaged, which will be called automatically.

Development

Clone this repo:

git clone https://github.com/BHznJNs/InputShare
cd InputShare

Install the requirements with:

pip install -r requirements.txt

Run the entry script:

python main.py

If you want to build this project by yourself, go on:

Build

Install the pyinstaller:

pip install pyinstaller

Get the customtkinter library path

pip show customtkinter

A Location will be shown, for example: c:\users\<user_name>\appdata\local\programs\python\python310\lib\site-packages

Use this command to build (replace <CustomTkinter Location> with customtkinter library path got above):

pyinstaller --windowed --icon=ui/icon.ico --add-data "./ui/icon.ico;ui/" --add-data "./ui/icon.png;ui/" --add-data "./adb-bin/;adb-bin/" --add-data "./server/scrcpy-server;server/" --add-data "<CustomTkinter Location>/customtkinter;customtkinter/" main.py