I like that real piano key border. Another way to do that might be to sew with a quite long stitch along that yellow line. Whenever a key is needed, put it there upside down, so that the end of the black key is just over the yellow line. Sew along the yellow line catching each key end as you go. When all the keys have been sewn on upside down, flip them up and sew all around them. Then remove that long stitching where it is seen.
This might be an easier way to turn under that tiny edge of the ribbon.