Get raw keyboard events from a Custom Keyboard

Is it possible to listen to hardware keyboard events from a Custom Keyboard extension?

I tried to override the pressesBegan/pressesEnded methods of my UIInputViewController subclass, but they don’t seem to be called at all.

Here are some example usages where this feature would be needed:
  • Create a custom keyboard for a layout that iPadOS doesn’t support

  • Create a custom keyboard that supports advanced substitution (e.g. when the user types “curdate”, it gets replaced by “2020-06-24”)

Get raw keyboard events from a Custom Keyboard
 
 
Q