Skip to main content

手机键盘控制电脑 - 通过手机浏览器控制电脑输入

Project description

手机键盘控制电脑

通过手机浏览器访问网页,使用虚拟键盘控制电脑输入。

原理:网页发送键盘按键到电脑,由电脑上的输入法(如搜狗、微软拼音)处理拼音转换。

快速安装

方法一:pip 安装(推荐)

# 安装
pip install screen-keyboard

# 运行
screen-keyboard

方法二:源码安装

# 克隆或直接下载后
pip install -e .

# 运行
screen-keyboard
# 或
python app.py

方法三:一行命令安装

curl -sL https://raw.githubusercontent.com/your-username/screen-keyboard/main/install-one-line.sh | bash

使用方法

1. 启动服务

screen-keyboard
# 或
python app.py

2. 手机访问

服务端启动后会显示局域网地址,例如:

局域网地址:http://192.168.1.100:5000

在手机上连接同一 WiFi,用浏览器访问该地址即可。

功能

  • ✅ 全键盘布局(QWERTY)
  • ✅ 符号/数字键盘切换
  • ✅ Shift 大写切换
  • ✅ 特殊按键(回车、退格、空格)
  • ✅ 方向键(倒 T 布局)
  • ✅ 触控板鼠标控制
  • ✅ 摇杆鼠标控制
  • ✅ 鼠标左右中键 + 滚轮
  • ✅ Win+Space 中英文切换
  • ✅ 拖动窗口/文件(双击触控板后拖动)

说明

  • 确保手机和电脑在同一局域网
  • 电脑需开启拼音输入法
  • 如果防火墙阻止,请开放 5000 端口

开发

# 创建 conda 环境
conda env create -f environment.yml
conda activate screen-keyboard

# 安装依赖
pip install -r requirements.txt

# 运行
python app.py

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

screen_keyboard-1.0.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

screen_keyboard-1.0.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file screen_keyboard-1.0.1.tar.gz.

File metadata

  • Download URL: screen_keyboard-1.0.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for screen_keyboard-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8df5df5988faea9f239615b911617e4b508d531e2484fa5ee35a3b22492c75c8
MD5 18b7a7da34bc19484577eaf5bf936975
BLAKE2b-256 6612d69a7130310d208053141b20663ff52c806b620acdd68051cdbfa4bcbbeb

See more details on using hashes here.

File details

Details for the file screen_keyboard-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for screen_keyboard-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b4973522b55199d3a22d40f3922961019558132905057abf0472b210c533496
MD5 4f62d9d8b44e27ab2916fd8f04a61d8a
BLAKE2b-256 4a0d8c6e5ce4b11aa8d7a3d45ae37de87e8249062aa757fa8169dc2b6a361662

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page