iOS handler doesn't intercept keyboard events on the simulator, but it works on a real iPad #16394
Labels
area-keyboard
Keyboard, soft keyboard
platform/iOS 🍎
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
Hello,
I try to implement an iOS keyboard handler to intercept keyboard events.
The full implementation is here https://github.com/JTOne123/MAUI-IOS-KEYBOARD/blob/main/MAUI-IOS-KEYBOARD/MAUI-IOS-KEYBOARD/Platforms/iOS/Handlers/KeyboardManagerHandler.cs
I was able to make it work on real devices; I can intercept key events on my iPad with a keyboard wherever I use it (with compatibility renderer and handler, they both work). But I faced an issue with the simulator.
Whatever the simulator IO/Keyboard settings I changed, there was no difference.
Then I created a Xamarin.Form a project with the same renderer, and I can run it on my simulator alongside the MAUI project. Xamarin project works perfectly on a simulator, I can press a key, and it intercepts the event. It proves that my simulator works well.
Then I decided to delete AppShell.xaml from my MAUI project.
JTOne123/MAUI-IOS-KEYBOARD@1a72ddb
As a result, the compatibility renderer started to work in the simulator, but no UI is shown; something is broken; I don't know what... Do you know what?
But still, the handler doesn't work (UI works)
In this image, you can see only the change I made to change between the renderer and handler.
https://github.com/JTOne123/MAUI-IOS-KEYBOARD/blob/main/MAUI-IOS-KEYBOARD/MAUI-IOS-KEYBOARD/MauiProgram.cs
I was wondering, do you have any ideas about this situation?
I appreciate any help.
Steps to Reproduce
Link to public reproduction project repository
https://github.com/JTOne123/MAUI-IOS-KEYBOARD
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
ios simulator only
Did you find any workaround?
Do not use a simulator, which is bad for the dev perspective.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: