开发者

How to detect external keyboard connectification in objective-c?

开发者 https://www.devze.com 2023-02-17 07:26 出处:网络
M开发者_JAVA百科y application need to know are external keyboard connect or no. How could i do to know that? No Private API please. :)If this is iOS related, I\'m not sure why you\'d want to detect th

M开发者_JAVA百科y application need to know are external keyboard connect or no. How could i do to know that? No Private API please. :)


If this is iOS related, I'm not sure why you'd want to detect this as the hardware keyboard acts exactly the same as the software keyboard (except with a few extra shortcuts for sound, brightness etc. which your app shouldn't use anyway).

If you're considering screen space, then the software keyboard will still send it's notifications when it is displayed or when it is hidden, so you can respond to those. For example, say you have the software keyboard up and then you connect your external keyboard. The software keyboard will hide, and will post the UIKeyboardWillHideNotification. So you can respond to that.

0

精彩评论

暂无评论...
验证码 换一张
取 消