Sweep/ bend object

How would I have a shape arch on one end and then smoothly blend to be flat…Sry i cant think of a better way to phrase it. Basically I have multiple objects joined, so there are gaps, and i want to curve the surface two ways and blend them. I couldn’t get it to work with the curve modifier.

Like this


The object I have are the keys

You could try a lattice.

Thanks, works perfectly.