Open carlh98 opened 3 years ago
@dr1rrb @carldebilly I think we can't support KeyDown
for arbitrary controls on iOS, right ? Only on TextBox
?
Was talking with @MartinZikmund today specifically about this... and it seems he found a way to have them.
@jeromelaban at least for the hardware keyboard, I tested with iPad, and was able to capture key events at the root view controller level. Seems to be a 13.4+ feature - https://www.swiftbysundell.com/tips/handling-keyup-and-keydown-events/. But all iOS users update immediately anyway, so definitely seems worth adding!
Swift by SundellHow to observe iOS 13.4’s new granular keyboard events.
In case of Android, we could also capture keyboard events at the activity level. Even though it does not include soft keyboard presses as Carl mentioned, the keyboard events are still most useful for hardware keyboard anyway. And it would open doors for things like keyboard shortcuts and whatnot
In case of Android, we could also capture keyboard events at the activity level. Even though it does not include soft keyboard presses as Carl mentioned, the keyboard events are still most useful for hardware keyboard anyway. And it would open doors for things like keyboard shortcuts and whatnot
Anyway I suspect those events on iOS won't work when coming from a software on-screen keyboard neither...
@carldebilly quite possible, but still better then no support 👍 . I would say most scenarios where KeyDown
handling (outside of TextBox
) is needed, will be most relevant for hardware keyboard anyway.
Removed from blocker, because design was changed back to previous iteration
What would you like to be added:
Support for keyboard input in Uno Platform.
Why is this needed:
Keyboard input and productivity scenarios.
Requirements
KeyDown
/Keyup
PreviewKeyDown
/PreviewKeyUp
CoreWindow
andApplication
key eventsRelated issues
For which Platform:
All
Anything else we need to know?
Internal issue: https://dev.azure.com/nventive/Maitre%20de%20Chai/_workitems/edit/218831