mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-02-22 23:12:16 +08:00
Merge branch 'master' into dev
This commit is contained in:
commit
9d7a795e63
@ -1,4 +1,4 @@
|
||||
# Scrcpy-mask
|
||||
# Scrcpy Mask
|
||||
|
||||
为了实现电脑控制安卓设备,本人使用 Tarui + Vue 3 + Rust 开发了一款跨平台桌面客户端。该客户端能够提供可视化的鼠标和键盘按键映射配置。通过按键映射实现了实现类似安卓模拟器的多点触控操作,具有毫秒级响应速度。该工具可广泛用于电脑控制安卓设备玩手游等等,提供流畅的触控体验。
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
## 视频演示
|
||||
|
||||
- [DNF 手游触屏操作反人类?但又不能在模拟器上玩 DNF 手游?不好意思,Scrcpy Mask “模拟器”的机制遥遥领先](https://www.bilibili.com/video/BV17U411Z7cN/?share_source=copy_web&vd_source=36923115230d8a46ae8b587fc5348e6e)
|
||||
- [如何用电脑玩 FPS 手游?这样的“安卓模拟器”,也不是不可以-哔哩哔哩](https://www.bilibili.com/video/BV1EU411Z7TC/?share_source=copy_web&vd_source=36923115230d8a46ae8b587fc5348e6e)
|
||||
- [M 系列 Mac 电脑玩王者,暃排位实录,使用 Android Stuido 模拟器和开源 Scrcpy Mask 按键映射工具-哔哩哔哩](https://b23.tv/q6iDW1w)
|
||||
- [自制跨平台开源项目 Scrcpy Mask ,像模拟器一样用键鼠控制任意安卓设备!以 M 系列芯片 MacBook 打王者为例-哔哩哔哩](https://b23.tv/gqmriXr)
|
||||
@ -64,9 +65,9 @@
|
||||
1. 从 [releases](https://github.com/AkiChase/scrcpy-mask/releases) 中安装适合你系统平台的软件包
|
||||
2. 确认你的安卓设备类型
|
||||
1. 对于手机或平板电脑等物理设备
|
||||
1. 你需要自己解决投屏的问题。推荐使用设备品牌的官方投屏方式,这样一般延迟最小。
|
||||
1. 你需要自己解决投屏的问题。推荐使用设备品牌的官方投屏方式,这样一般延迟最小。自 `v0.5.0` 版本起,可以配合[ScreenStream](https://github.com/dkrivoruchko/ScreenStream)在同一局域网下投屏。
|
||||
2. 通过 USB 或无线方式在设备上启用 ADB 调试,然后将其连接到电脑。
|
||||
2. 对于模拟器,不仅不需要投屏,而且模拟器通常默认启用 ADB 有线调试。所以几乎不用操作就能获得最好的体验。
|
||||
2. 对于模拟器,不仅不需要投屏,而且模拟器通常默认已经启用了 ADB 有线调试。所以几乎不用操作就能获得最好的体验。
|
||||
3. 启动软件并导航到设备页面。
|
||||
1. 在可用的设备中查找你的设备(如果未找到,请自行搜索如何为安装设备启用 ADB 调试)。
|
||||
2. 右击设备并选择“控制此设备”。
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Scrcpy-mask
|
||||
# Scrcpy Mask
|
||||
|
||||
[中文介绍](./README-zh.md)
|
||||
|
||||
@ -33,6 +33,7 @@ Furthermore, to better support interaction between Scrcpy Mask and Android devic
|
||||
|
||||
## Demonstration video
|
||||
|
||||
- [DNF 手游触屏操作反人类?但又不能在模拟器上玩 DNF 手游?不好意思,Scrcpy Mask “模拟器”的机制遥遥领先](https://www.bilibili.com/video/BV17U411Z7cN/?share_source=copy_web&vd_source=36923115230d8a46ae8b587fc5348e6e)
|
||||
- [如何用电脑玩 FPS 手游?这样的“安卓模拟器”,也不是不可以-哔哩哔哩](https://www.bilibili.com/video/BV1EU411Z7TC/?share_source=copy_web&vd_source=36923115230d8a46ae8b587fc5348e6e)
|
||||
- [M 系列 Mac 电脑玩王者,暃排位实录,使用 Android Stuido 模拟器和开源 Scrcpy Mask 按键映射工具-哔哩哔哩](https://b23.tv/q6iDW1w)
|
||||
- [自制跨平台开源项目 Scrcpy Mask ,像模拟器一样用键鼠控制任意安卓设备!以 M 系列芯片 MacBook 打王者为例-哔哩哔哩](https://b23.tv/gqmriXr)
|
||||
@ -66,7 +67,7 @@ Furthermore, to better support interaction between Scrcpy Mask and Android devic
|
||||
1. Install software suitable for your system platform from [releases](https://github.com/AkiChase/scrcpy-mask/releases)
|
||||
2. Identify your Android device type
|
||||
1. For physical devices like phones or tablets
|
||||
1. You need to solve the problem of screen casting on your own. Recommend using the official screen mirror method of your device brand to achieve the minimum delay
|
||||
1. You need to solve the problem of screen casting on your own. Recommend using the official screen mirror method of your device brand to achieve the minimum delay. Since `v0.5.0` version, it can be used with [ScreenStream](https://github.com/dkrivoruchko/ScreenStream) to cast screen under the same LAN.
|
||||
2. Enable ADB debugging on your device via USB or wirelessly, then connect it to your computer.
|
||||
2. For emulator, you don't need screen mirror, and emulator generally default to enabling ADB wired debugging. So this is the best way for game, I think.
|
||||
3. Launch the software and navigate to the Device page.
|
||||
|
@ -60,6 +60,8 @@ let deviceWaitForMetadataTask: ((deviceName: string) => void) | null = null;
|
||||
let deviceWaitForScreenSizeTask: ((w: number, h: number) => void) | null = null;
|
||||
|
||||
let unlisten: UnlistenFn | undefined;
|
||||
let lastClipboard = "";
|
||||
|
||||
onMounted(async () => {
|
||||
unlisten = await listen("device-reply", (event) => {
|
||||
try {
|
||||
@ -69,10 +71,19 @@ onMounted(async () => {
|
||||
deviceWaitForMetadataTask?.(payload.deviceName);
|
||||
break;
|
||||
case "ClipboardChanged":
|
||||
console.log("ClipboardChanged", payload.clipboard);
|
||||
if (payload.clipboard === lastClipboard) break;
|
||||
lastClipboard = payload.clipboard;
|
||||
navigator.clipboard
|
||||
.writeText(payload.clipboard)
|
||||
.then(() => {
|
||||
message.info(t("pages.Device.clipboard.deviceSync.success"));
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
message.error(t("pages.Device.clipboard.deviceSync.failed"));
|
||||
});
|
||||
break;
|
||||
case "ClipboardSetAck":
|
||||
console.log("ClipboardSetAck", payload.sequence);
|
||||
break;
|
||||
case "DeviceRotation":
|
||||
if (deviceWaitForScreenSizeTask) {
|
||||
@ -222,7 +233,7 @@ function onMenuClickoutside() {
|
||||
async function deviceControl() {
|
||||
let curClientInfo = await getCurClientInfo();
|
||||
if (curClientInfo) {
|
||||
message.warning(t("pages.Device.alreadyControled"));
|
||||
message.error(t("pages.Device.alreadyControled"));
|
||||
store.controledDevice = {
|
||||
scid: curClientInfo.scid,
|
||||
deviceName: curClientInfo.device_name,
|
||||
@ -236,12 +247,6 @@ async function deviceControl() {
|
||||
port.value = 27183;
|
||||
}
|
||||
|
||||
if (store.controledDevice) {
|
||||
message.error(t("pages.Device.deviceControl.closeCurDevice"));
|
||||
store.hideLoading();
|
||||
return;
|
||||
}
|
||||
|
||||
message.info(t("pages.Device.deviceControl.controlInfo"));
|
||||
|
||||
const device = devices.value[rowIndex];
|
||||
|
@ -178,7 +178,7 @@ onUnmounted(() => {
|
||||
<NFormItem :label="$t('pages.Setting.Mask.opacity')" label-placement="left">
|
||||
<NSlider
|
||||
v-model:value="store.maskButton.transparency"
|
||||
@update:checked="localStore.set('maskButton', store.maskButton)"
|
||||
@update:value="localStore.set('maskButton', store.maskButton)"
|
||||
:min="0"
|
||||
:max="1"
|
||||
:step="0.01"
|
||||
|
@ -14,7 +14,6 @@
|
||||
"screen": "Get screen size"
|
||||
},
|
||||
"deviceControl": {
|
||||
"closeCurDevice": "Please close the current control device first",
|
||||
"controlInfo": "The control service is starting. Please keep the device screen on.",
|
||||
"connectTimeout": "Device connection timeout"
|
||||
},
|
||||
@ -37,7 +36,13 @@
|
||||
"wsConnect": "Control",
|
||||
"adbDeviceError": "Unable to get available devices",
|
||||
"adbConnectError": "Wireless connection failed",
|
||||
"rotation": "Device rotation {0}°"
|
||||
"rotation": "Device rotation {0}°",
|
||||
"clipboard": {
|
||||
"deviceSync": {
|
||||
"success": "Device clipboard synced",
|
||||
"failed": "Device clipboard sync failed"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mask": {
|
||||
"keyconfigException": "The key mapping config is abnormal, please delete this config",
|
||||
|
@ -13,7 +13,6 @@
|
||||
"screen": "获取屏幕尺寸"
|
||||
},
|
||||
"deviceControl": {
|
||||
"closeCurDevice": "请先关闭当前控制设备",
|
||||
"controlInfo": "正在启动控制服务,请保持设备亮屏",
|
||||
"connectTimeout": "设备连接超时"
|
||||
},
|
||||
@ -37,7 +36,13 @@
|
||||
"wsConnect": "控制",
|
||||
"adbDeviceError": "无法获取可用设备",
|
||||
"adbConnectError": "无线连接失败",
|
||||
"rotation": "设备旋转 {0}°"
|
||||
"rotation": "设备旋转 {0}°",
|
||||
"clipboard": {
|
||||
"deviceSync": {
|
||||
"success": "已从设备同步剪切板",
|
||||
"failed": "从设备同步剪切板失败"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Mask": {
|
||||
"keyconfigException": "按键方案异常,请删除此方案",
|
||||
|
Loading…
Reference in New Issue
Block a user