iOS Virtual Keyboard issue

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
Hi. I'm finally at a point in development when iOS's virtual keyboard is needed to progress any further.

I call it with EnableKeyboard(), and it does actually show up... for a split second. Then it seems to get overlapped by my game's screen.

Can anybody help me out here? This is killing me. I really want to avoid using a homemade virtual keyboard.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Hi Aleana, do you render during the time the keyboard is active? It should not overlap the keyboard but changes to IOS and/or the IOS target could have broken it. I am on El Capitan and Xcode 8. Not sure if I can help you out here. Will try tonight or latest tommorow. At least with the emulator.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
I could not replicate this in the simulator. Could you provide an example that shows the problem?
 

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
I could not replicate this in the simulator. Could you provide an example that shows the problem?
I certainly will. :) Just gimme a day to finish something I've been working on and then I'll try and upload an image or video of the issue. Sorry for taking so long to read this, and thank you for the help!

Oh, and I'm using iOS 11.2.x and macOS Sierra 10.12.6 with the most recent Xcode.
 

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
So, obviously, I haven't been able to get you a visual of the ios keybaord... I'd have to undo a ton of work that I've done on the replacement version (I thought I was being clever - hehehe - no...) I'm really sorry for taking forever to get back on here.

My keyboard shows up in-game with no issues, however:
Can you explain why TouchHit() and TouchDown() don't register anything on the edges of the screen, yet TouchX() and TouchY() do? Weird. The thing is (and I've tried various things) it's just not possible to rig a , decent key-press without some TouchHit() or "TouchRelease()" registration. The RETURN BUTTON, SPACEBAR, 123, SHIFT, Q, P, and BACKSPACE keys are being stupid.

I've not had to deal with this until now because most everything is far enough away from the edges.

I simply MUST figure this out. Fourteen months of work is hinged on that dastardly keyboard working properly.
I've attempted installation on three separate devices: iPhone 6s, iPhone 6s+, and an iPhone SE... and all have the same issue. Other applications not made by me work perfectly fine. (example: Apple's iMessage registers all keys properly)
 

Attachments

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
So wait... you say the keyboard works fine now.
The IOS keyboard and the TouchHit and TouchDown are complete seperate things. Have nothing to do with each other.
When the keyboard is enabled, you should not try to read touches imho.
 

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
I do scale certain images here and there, but not on the keyboard. :) I didn't even consider that - good thought. I'm still using mojo.
 

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
Oh, and yes... I'm aware of that the keyboard and TouchHit() functions are separate. As far as the ios keyboard was concerned, I'm not using it because the screen refresh was interfering with it. And, my background image needs to be continuously updated. I've built my own... that's why I'm using TouchHit(). I don't know any other way.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Ok, I will look into this tommorow. Is the problem only showing in the right and bottom edge or on all edges?

And do you have a real splashscreen set for IOS or do you run your own?
 

aleana

New Member
Joined
Sep 7, 2017
Location
San Francisco
Hmmmm... Let me try to reply to each question in order. :cool:



So wait... you say the keyboard works fine now[?]

I gave up on trying to get the iOS onscreen keyboard because I realized that my application was drawing over it during the screen's refresh. In this application, I need the entire screen to update the whole time the application is running. (I have "plans")​

The iOS keyboard and the TouchHit and TouchDown are complete separate things. Have nothing to do with each other.
When the keyboard is enabled, you should not try to read touches imho.

Yes. Exactly. Due to my having to create my own onscreen keyboard, I needed some touch recognition.
Thus, I used TouchDown() at first*.​

Do you use any scaling?
I do. But not on anything involving the keyboard that I created.​

What framework do you use to render? mojo or mojo2?

I use mojo and ignition-x.
Is the problem only showing in the right and bottom edge or on all edges?
It's happening on all edges, on all iPhones. (this issue happens all through the application, no just when the keyboard is up, too)
Do you have a real splash-screen set for iOS or do you run your own?
I think you're referring to the black image that Xcode provides when first installing onto an iPhone, right? If so, I am using my own, set to 1242 x 2208. (this was my attempt to build the application at the same resolution of an iPhone 6s+ so it wouldn't be blurred by stretching the canvas to fit its screen.)


One of my girlfriends told me that I'm terrible at explaining things, so I figured that this "recap" might help.

* When I first started making my replacement onscreen keyboard, I originally built it using ignition-x's prefab buttons. That's when I discovered that any buttons placed on the edge of the screen weren't triggering.

After many iterations of trying to solve this issue, and frantically searching for help on this forum, I decided to rework ignition-x's buttons... not realizing until today that the buttons were triggered by TouchDown() and not TouchHit().

It seems that TouchHit() only registers intermittently around the edges on an iPhone. And since TouchDown() is triggered by some preset-number of registered TouchHit() detections, TouchDown() doesn't trigger, either. That might explain why I'm able to get TouchX() and TouchY() coordinates without any issues, no matter where I touch the screen even though I didn't get any TouchDown() triggers.

This morning, I rearranged some code and switched the TouchDown() call to a TouchHit() as a test... and it seems to work.

Maybe I am wrong? I'm just not certain yet. I've only gotten the idea to check for things I wouldn't have thought of on my own because you were on here. I'm grateful for your help. I'm not sure if providing a small app to demonstrate the touch issue will be useful since the problem only appears on an actual device - not the simulator - and not on the desktop either. I can, however provide a zipped video of what was happening with the edge of the screen BEFORE switching TouchDown() to TouchHit().
 

Attachments

MikeHart

Administrator
Joined
Jun 19, 2017
Location
Germany
Hi Aleana, I am sorry but I am not able to help you with a real device test. I have an IPhone 6s here but with IOS11.
My Imac from 2009 runs El Capitan and Xcode 8 which is not supporting IOS11.

One last idea I have. Did you add the correct default image to your project?

In the simulator it runs fine...

Maybe @Martin can look into this.
 

Attachments

Top Bottom