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

Can not input text on iphone dialog and many more input. #4

Open
karmamaster opened this issue Mar 27, 2018 · 9 comments
Open

Can not input text on iphone dialog and many more input. #4

karmamaster opened this issue Mar 27, 2018 · 9 comments

Comments

@karmamaster
Copy link

Hello Mringwal,
I was tried to use Hid-support to input text to the text box on iphone, everything is work well until I tried to input a text to google search box or iphone pop up dialog, it is not working. Hid-Support do not enter any text string to these input box.

Please help,
Thanks

@mringwal
Copy link
Owner

what iOS version is this?

@karmamaster
Copy link
Author

karmamaster commented Mar 28, 2018

I am working all version of IOS 10 (exclude 10.3.3) and all version of ios 9. These iphone are jailbroken

More info: I have tried to use autotouch to test their writetext function and it is working well but not with hid-support. Furthermore, I have detected that the hid-support can not write a string with space character in it, exp: "this is test string" and the hid can only write "this" but not the whole string, but it is filled whole string with autotouch!

Do you have any idea please!
Thanks.

@karmamaster
Copy link
Author

@mringwal Please help me or point me a direction to fix this bug

@mringwal
Copy link
Owner

mringwal commented Apr 1, 2018

No idea about autotouch.

hid-support on iOS 7+ injects into backboardd and uses a function to query which app is in front at position 100,100 and then sends an IOHIDEvent to that app. If there's a pop-up, it might send the key input to another app.

was the 'iphone pop up' a system dialog, like 'enter wifi password' or so? I think this worked with older versions. there's code that tries to detect if there's a dialog by SpringBoard (the Wifi popup is probably shown by SpringBoard), maybe the system dialog detection is broken.

I guess there should be a better way to figure out which app is in front/has the keyboard focus.

You could try different coordinates to see if this changes the behaviour a bit.

sorry, I didn't use/work with iOS JB since quite a while. I'll release an update if you or someone can provide a fix for it.

@karmamaster
Copy link
Author

Yeah, Seems like that the "pop up" is a system dialog. Hid is neither work on "enter wifi password" nor "enter apple id" dialog too.

Can you talk more about "position 100,100"? I will very glad to help if I could

@mringwal
Copy link
Owner

mringwal commented Apr 4, 2018

Position (100,100) is used here: https://github.com/mringwal/hid-support/blob/master/hidspringboard/Tweak.xm#L436

I have a vague recollection that a GSEvent could just be sent to the frontmost application.

@laoyur
Copy link

laoyur commented May 15, 2018

doesn't work for me on iOS 10.3.3 either
[CAWindowServer serverIfRunning] always return nil, so it simply cannot find the client-port of the front-most application.
I tried to use GSGetPurpleApplicationPort() which returns non-zero port, but still can't make it work.

@laoyur
Copy link

laoyur commented May 15, 2018

seems like we can use IOHIDEventCreateKeyboardEvent to generate keyboard event for text typing
but I don't know how to input unicode string by this way :(

@mringwal
Copy link
Owner

IOHIDEventCreateKeyboardEvent could be used, but I didn't find a way to enter any text (unicode). Because of this, on iOS 7+ hidsupport sends the text as GSEvent to the app and then simulates the typing inside the app itself.

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

No branches or pull requests

3 participants