Open janne-hmp opened 2 weeks ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I was able to reproduce
net8.0
MAUI 8.0.82 debugger stops on breakpointnet9.0-preview7
MAUI 9.0.0-preview.7.24407.4 debugger does not stop on breakpoint
Description
I'm using the following code in Xamarin and .NET MAUI to capture external hardware keyboard key presses on Android in the MainActivity class:
In Xamarin, the key presses are successfully captured (and then handled by my HandleOnKeyUp function), but in .NET MAUI the event never fires. Instead, the arrow keys move some sort of a selection rectangle around various UI elements in the screen. Other keys do not do anything.
Is there a way to switch of this selection navigation behavior so that the OnKeyUp would fire like in Xamarin Android? I suppose the key presses are now possibly being captured before MainActivity by one of the MAUI elements to implement the selection rectangle behavior. Or is there another way to capture the key presses in MAUI on Android?
Steps to Reproduce
Link to public reproduction project repository
https://github.com/hyvanmielenpelit/GnollHack
Version with bug
9.0.0-preview.7.24407.4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14
Did you find any workaround?
No, external keyboard does not seem to work on Android in .NET MAUI, except for moving the selection rectangle around
Relevant log output
No response