Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加文本输入支持以及key event修改 #5

Merged
merged 5 commits into from
Mar 7, 2024

Conversation

nfh994
Copy link
Contributor

@nfh994 nfh994 commented Mar 4, 2024

Adb自带的input text只支持英文,要支持中文需要额外装东西,输入文本这个需求应该挺常见的
顺便修改了key event,maa原本的虽然也有区分down和up,但是默认repeat都是0,所以无法达到长按的效果
我加了个参数o执行单次点击按键,d和u改为长按
比如
k 8 d
w 1000
k 8 u

@nfh994 nfh994 changed the title 添加文本输入支持 添加文本输入支持以及key event修改 Mar 5, 2024
Copy link
Member

@Cryolitia Cryolitia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

免责声明:未进行实机测试,未进行独立第三方的安全性审查,本review不对代码可用性和安全性做担保。

@MistEO
Copy link
Member

MistEO commented Mar 5, 2024

o 咋玩的

@nfh994
Copy link
Contributor Author

nfh994 commented Mar 5, 2024

o 咋玩的


k 8 o
c
单次点击按键

@MistEO
Copy link
Member

MistEO commented Mar 5, 2024

感觉这个单次按键没什么用,k 的 d u 是不是可以实现同样的功能?

不过功能倒是不嫌多就是了(

@nfh994
Copy link
Contributor Author

nfh994 commented Mar 5, 2024

感觉这个单次按键没什么用,k 的 d u 是不是可以实现同样的功能?

是可以,原本的maatouch就是这样,但是原本的maatouch不支持长按,我把 d u 改成默认长按了

@MistEO MistEO requested a review from aa889788 March 5, 2024 15:17
@nfh994
Copy link
Contributor Author

nfh994 commented Mar 5, 2024

感觉这个单次按键没什么用,k 的 d u 是不是可以实现同样的功能?

不过功能倒是不嫌多就是了(

举例个使用场景:
k 224 o
c
点亮屏幕

k 123 o
k 67 d
w 1000
k 67 u
c
删除文本框内容

@MistEO MistEO merged commit e2419ac into MaaAssistantArknights:master Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants