2

i can't seem to find any documentation on how to detect the physical keyboard connection (bluetooth) inside a keyboard extension application. Our keyboard extension is helping children suffering dyslexia how to write. I need to detect if a physical keyboard is attached so i don't show the whole virtual keyboard too. I know it's possible because only one application is doing it perfectly and it's called 'Grammarly'. The only thing i tried so far is overriding the pressesBegan function which is not called in a keyboard extension.

func pressesBegan(_ presses: Set<UIPress>, 
         with event: UIPressesEvent?)

It must be something custom i guess.

hugo411
  • 320
  • 1
  • 12
  • 29

1 Answers1

1

You can detect physical keyboard on iOS 14 GameController SDK by using public API GCKeyboard. You just need to import GameController

let isKeyboardConnected = GCKeyboard.coalesced != nil
Jayesh Patel
  • 938
  • 5
  • 16