Typically drill presses are not used for cutting keyholes, but this does not mean that you cannot use them for that purpose. When you look at user answers regarding this topic, most of them do not recommend this usage, and their advice for you is: buy a mill and call it a day; a drill press is a drill press not a mill.
Well yes, we all know that, but not everyone has the possibility of buying a mill.
Well let’s start, first you need to figure out the tonnage you need to punch your material. You can find a mechanical punch at low tonnage for relatively cheap money and fast, you can also purchase the keyhole dies. An H-frame press with die and holder would work and an arbor press might work also. Milling on a drill press can be a challenge and also dangerous. This is because machining on a drill press will wear it out in short order and most of them cannot handle side loading very well. Most use tapers that are not designed for side loading and may release unexpectedly once the pressure is released in simple words: the chuck will fall out. Most drill presses lack table height control and few have locking quills making maintaining depth a chore.
The most appropriate solution would be to use a router bit in a drill press. This bit needs to be carbide.
There are some users which have managed to do this, but most of them do not recommended it because the very purpose of a drill press which is that they are built to take pressure up and down and not sideways. Another important point to keep in mind whenever contemplating using the DP as a milling machine is that your drill chuck is attached to the quill by nothing more than the mild friction fit of a morse taper. It is intended mostly for longitudinal compression loads, not lateral or tension. Not so much a concern for the bearings, but your chuck and cutting tool can fall out spinning, without prior warning simply due to gravity, when lateral vibrations are present without enough axial compression. Best to ensure your drill chuck is as firmly seated in the morse taper as practical.
So if you have the courage go and try it, but if not, maybe it is just better to buy a mill or simply find a friend who has one.