Detect key press from external device

Hi, I have a device that transmit data as keyboard wedge (send data as it would be pressed from an external keyboard). I want to detect that input, but I do not find any keypress event in Xamarin.Forms.

One workaround could be to create a Entry and subscribe to the TextChanged event, but then I should hide the soft keyboard when the entry controls gets focus since I don't use it.

Any advice?
Thanks

Tagged:

Posts

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I don't think there's going to be a stock Forms way of doing this. In iOS you can use the UIResponder's KeyCommands property to handle hardware keyboard presses without showing the software keyboard. It's not totally straightforward, but it can be done. I don't know how it works on Android.

Sign In or Register to comment.