Welcome to the forums!
Unfortunately, you can't record a pattern from a MIDI keyboard or the Capslock keyboard into Ultrabeat's sequencer.
I think this and the ability to drag MIDI regions from the arrange into Ultrabeat would make great features.
Of course, you can record an ultrabeat pattern using your midi keyboard into Logic's sequencer.
Yes, i hope so. I wonder if it would be possible to record directly into UB's sequencer - perhaps a bit tricky to implement, but even if you could record a 32 step region in the arrange or hyper editor and drag/export it into a pattern in UB - that would be cool.
By the way, you can suggest this to the logic developers through this link: