I was wondering if there was a way to open the iOs keyboard and programmatically press a button without interacting with the keyboard itself.
Yes, there is a way. There are actually several ways but all of them are undocumented and you definitely should not used them in production.
Generating a tap means generating a
UIEvent (several of them, actually) and passing it to
UIEvent inner structure is undocumented but some people have already inspected it and you can google tools to synthesize events (e.g. https://github.com/n00neimp0rtant/ControlFreak). However note that the internal structure of
UITouch can change between iOS versions (see iOS 9 UIEvent)
You can also use the internal UIAutomation API (see for example these generated headers) to generate a tap (that's what UI tests were using in previous releases) but again, this API is not publicly documented and it is loaded into the app only if the app is connected to Xcode. I am not sure how this private framework looks like on iOS 9.