FlamedDogo99 / EaglerMobile

A userscript that allows EaglerCraft to run on mobile browsers. As of June 15, 2023, the Eagler Mobile script is directly integrated with the main EaglerCraft website!
Apache License 2.0
15 stars 18 forks source link

[Bug] Keyboard issue on Android mobile devices #7

Closed RealPlurr closed 2 months ago

RealPlurr commented 3 months ago

Describe the Bug Keyboard doesn't work correctly (or at all) on android phone (redmi 8). Wont type in chat or and wont type in username field.

Steps to Reproduce Start launcher, click keyboard button try to type and see it works broken or dont work at all.

Additional Information Browser google and chrome. Latest version available from google play market. Phone redmi 8 using google keyboard and android version 10, MIUI 12.5.3 (stable version)

colbster937 commented 3 months ago

idk if it will work i was the one who added the keyboard button and i only have iOS so i only tested it there

RealPlurr commented 3 months ago

Like keyboard opens but with it also whole game moves down, and secondly it wont even type so idk. ChatGPT says that it technically muss work but it doesn't.

colbster937 commented 3 months ago

moves the game down? if its moving the game out of the way for the keyboard then thats probably built into the os/browser.

RealPlurr commented 3 months ago

Yeah but it also makes like idk white gap between keyboard and game it can be also bug of this js feature idk but anyways it isnt such critical bug the most critical that it wont type at all

colbster937 commented 3 months ago

But the keyboard opens right?

RealPlurr commented 3 months ago

It opens keyboard but it wont type leme attach photos

RealPlurr commented 3 months ago

Screenshot_2024-06-02-17-03-24-378_com android chrome Screenshot_2024-06-02-17-03-15-836_com android chrome

RealPlurr commented 3 months ago

Also new bug button goes off screen before it wasn't happening and I typed "Bello" and it didn't wrote as you see

FlamedDogo99 commented 3 months ago

I have several ideas I can try, but support is limited since we currently don’t have any android devices to test with. Several ideas:

colbster937 commented 3 months ago

I mean we could test in android studio just running a browser

RealPlurr commented 3 months ago

Okay, I hope y'all will be able to fix it. By the way you can emulate android using BlueStackX or smth

RealPlurr commented 3 months ago

I mean we could test in android studio just running a browser

Also good option

FlamedDogo99 commented 3 months ago

I just quickly added both ideas, holler if it makes a difference. Edit: I don’t think this will make a difference. The Eagler application is looking for a key event where key, keyCode and which are defined. It may be that your custom keyboard simply isn’t dispatching the correct events, and I’m not really sure how to work around that. If I could directly inject code into the Eagler client during runtime I could easily fix this, but until then I’m not sure. I’ll keep looking into this, and hopefully someone else with more experience with android can weigh in.

RealPlurr commented 3 months ago

Leme test it rq

RealPlurr commented 3 months ago

Screenshot_2024-06-02-17-19-42-033_com android chrome

Now buttons are a bit out of their places

And Now I can't close keyboard using button it keeps appearing after closing it using < or button

RealPlurr commented 3 months ago

Oh wait forgot to rotate phone my bad leme test it rotated

colbster937 commented 3 months ago

and the button doesn't close it it only opens it

FlamedDogo99 commented 3 months ago

I need to do some more research on this. I’ll get back to you.

RealPlurr commented 3 months ago

Ok so. It still bugged and buttons are out of screen. Secondly its impossible now to close keyboard beacuse it loops opens. Thirdly it wont type like it was. White gaps became smaller but still exist

RealPlurr commented 3 months ago

and the button doesn't close it it only opens it

Then we need add for mobile android devices close button beacuse it loop opens it

colbster937 commented 3 months ago

Well by what i have tested its impossible to close the keyboard with js so idk

RealPlurr commented 3 months ago

Then uh need unloop it somehow, anyways but it still wont type its also critical bug now there is 2 critical bugs

colbster937 commented 3 months ago

okay...

RealPlurr commented 3 months ago

I think now its kinda chrome issue fully..

colbster937 commented 3 months ago

let me test it on chrome on ios and see if i get the same issues

colbster937 commented 3 months ago

no i dont get the issue but its probably because apple makes google use webkit on ios chrome but on android im guessing it uses chromium?

RealPlurr commented 3 months ago

Yeah it definitely uses Chromium ig. Anyways it still happens probably even android bug idk. The fact keyboard is hella buggy is fact

colbster937 commented 3 months ago

try using another browser that has another engine like firefox and see if it happens there

RealPlurr commented 3 months ago

Same issue

colbster937 commented 3 months ago

hmmmmm

RealPlurr commented 3 months ago

No clue it muss be fixed somehow... there is a lot more android users than iOS users so yeah

colbster937 commented 3 months ago

yea

FlamedDogo99 commented 3 months ago

Alright I have a solution but it will take me some time to fix regardless. 1) Looping open keyboard

This would eliminate the need for constantly implementing changes to jump through each devices requirements for reading the key events, and feels fairly straightforward to implement.

I’ll start working on this tomorrow unless someone else wants to take a stab at it.

colbster937 commented 3 months ago

Yeah I would have made the keyboard button do that and track the state but it just worked for me when clicking the done button on the top of the keyboard it would be fine so that's why I didn't image

PlurrYT-Kolama commented 3 months ago

android doesn't have such button

colbster937 commented 3 months ago

i fixed the looping check my pull request

colbster937 commented 3 months ago

oh and completely off topic but i've found by using shadow client i can get at least 30 fps so i think thats the next thing to try to make it automatically optimize the settings

colbster937 commented 3 months ago

well good for you i was just saying from my personal experience

FlamedDogo99 commented 3 months ago

Y’all keep it on topic in the issues. I can open up discussions if you really want to do that

colbster937 commented 3 months ago

okay sorry but can you?

RealPlurr commented 3 months ago

Anyways lets move to issue. Any progress on fix?

colbster937 commented 3 months ago

no not really

colbster937 commented 3 months ago

(for me)

FlamedDogo99 commented 3 months ago

Actually, I could use all of your help. If anyone has an android device, could they go to https://w3c.github.io/uievents/tools/key-event-viewer.html and type “e”, and post a screenshot of the result here? I’m close to a solution but I want to make sure it will work.

colbster937 commented 3 months ago

i dont have an android device but here's it in bluestacks image

RealPlurr commented 3 months ago

Screenshot_2024-06-03-17-25-56-698_com android chrome

PlurrYT-Kolama commented 3 months ago

any updates?

FlamedDogo99 commented 3 months ago

Oh wow, that’s not good. Most of your UIEvents are undefined, and that makes this extremely hard to work with. This is what it ideally should be closer to: IMG_0594 There’s a really bloated solution I could implement, but it’s making me question if I should even put in the effort. This might be something that we wait for Android to fix, because there’s no reason for it not to support keyCode, which, or key. From https://github.com/substance/substance/issues/982:

I read some of the comments in that long thread.. installing hacker's keyboard will fix the issue (sends correct key codes) with the typing and the save button getting triggered properly.

https://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard&hl=en

So it appears to be an issue dealing with the returned key codes.

Y’all might have to fix things on your end

PlurrYT-Kolama commented 3 months ago

uh then its android issue

PlurrYT-Kolama commented 3 months ago

we kinda cant do anything about that so kinda this project is broken for android