Possibly related: A single mesh made of 12k points with 12k different materials. Is that possible?
There are many questions and examples here regarding mouse interaction. Key interaction is similar. Just keep track of the states of the relevant buttons/keys, and let the states guide the updates.
If you represent the “tiles” as individual objects, you can “delete” them by manipulating their visibility. If you apply the tiles as a single map to a single geometry, you can use an alphaMap with matching dimensions from a DataTexture, and update the DataTexture with your “drawing” and “erasing” actions.