For IOS direct and BLE connectivity, I'm playing with boards available from Adafruit and other vendors. I'm using the Adafruit ones and find they're very easy to use, work well and have a lot of support documentation and examples. Some are actually programmable in a python dialect called Circuit Python.
I have NOT, however tried them with the cb module, but there's no reason they shouldn't work.
The easiest way to do what you are trying to do is to skip cb and use HID interfacing to create actual keyboard devices. This way your python program can use regular keyboard IO.
In fact, I've even used HID USB interfacing with Apple's Camera Connection Kit adapter to connect this type of device via USB.
The Adafruit "ItsyBitsy M0 Express" is a tiny controller that can be powered and run directly from a USB connection. A trivial python program can be used to simulate keyboard codes from contact closures with no additional parts besides the switches. I'm playing with a "page turner" that uses a foot pedal to turn document pages this way.
I'm also playing with a similar project using BLE with a fancier board called the "Feather MO Bluefruit LE". It's based on the popular Arduino development support, but there are plenty of samples and documentation for doing this kind of thing. There are many more boards available from Adafruit and others at various price points with different BLE and hardware IO and programming support.
All the BLE boards also support general purpose "BLE GAP" programming if you want to use the "cb" module to communicate, but I haven't played with that approach very much.
Just google "Adafruit".
Hope this info helps....
( I have no connection with Adafruit - I'm just a satisfied customer...)