How to achieve the round corners of a black piano key?
The algorithm used for subdivision surfaces works best with quads. You have many n-gons in your mesh, which will lead to artifacts.


You should at least convert the front and top face to quads. You can do that in two steps: select the top and front face and press [Ctrl+T] to triangulate them.



Now select two triangles that you want to merge to a quad and press [Alt+J]. Repeat until you have no more triangles.



To keep the edges sharper, add a bevel modifier on top of the subsurf. Now you can control the roundness / sharpness through the bevel's "Width" parameter.


The result should look like this: