So basically you use a little bit of ink roughly where the typeface will be, when the laser melts the plastic, some pigment will diffuse into the melted plastic, but the unmelted/undiffused stuff is still removable.
If I had to guess this is how it’s actually done on the nicer older keycaps.