Screwed in keys are known as Dutch keys.
If no hand slotting tool sis available (I use one designed by the late peter "Bushy" Robinson, intended for a Myford 7 Series lathe, using a casting from College engineering Supplies) On a raising block, it still finds use on my larger lathe.
But lacking such a tool, with a toolbit ground to 5mm, in a suitable holder, in either the toolpost , by racking the saddle to and fro and putting on the cut with the Cross Sl;ide, a keyway can be cut. As already said, make life easier by drilling out first of all, so that only the corners need to be cut.
Once needing a central 1/8" square socket, for a speedo drive, I used the tailstock in similar manner.
Howard